<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Types.Var.Env</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-7"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Var, Id and TyVar environments (maps)</span></span><span>
</span><span id="line-8"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier">VarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#IdEnv"><span class="hs-identifier">IdEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#TyVarEnv"><span class="hs-identifier">TyVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#CoVarEnv"><span class="hs-identifier">CoVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#TyCoVarEnv"><span class="hs-identifier">TyCoVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-9"></span><span>
</span><span id="line-10"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Manipulating these environments</span></span><span>
</span><span id="line-11"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#emptyVarEnv"><span class="hs-identifier">emptyVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#unitVarEnv"><span class="hs-identifier">unitVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#mkVarEnv"><span class="hs-identifier">mkVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#mkVarEnv_Directly"><span class="hs-identifier">mkVarEnv_Directly</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#elemVarEnv"><span class="hs-identifier">elemVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#disjointVarEnv"><span class="hs-identifier">disjointVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier">extendVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#extendVarEnv_C"><span class="hs-identifier">extendVarEnv_C</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#extendVarEnv_Acc"><span class="hs-identifier">extendVarEnv_Acc</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#extendVarEnvList"><span class="hs-identifier">extendVarEnvList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#plusVarEnv"><span class="hs-identifier">plusVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#plusVarEnv_C"><span class="hs-identifier">plusVarEnv_C</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#plusVarEnv_CD"><span class="hs-identifier">plusVarEnv_CD</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#plusMaybeVarEnv_C"><span class="hs-identifier">plusMaybeVarEnv_C</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#plusVarEnvList"><span class="hs-identifier">plusVarEnvList</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#alterVarEnv"><span class="hs-identifier">alterVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#delVarEnvList"><span class="hs-identifier">delVarEnvList</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#delVarEnv"><span class="hs-identifier">delVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#minusVarEnv"><span class="hs-identifier">minusVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#lookupVarEnv"><span class="hs-identifier">lookupVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#lookupVarEnv_NF"><span class="hs-identifier">lookupVarEnv_NF</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#lookupWithDefaultVarEnv"><span class="hs-identifier">lookupWithDefaultVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#mapVarEnv"><span class="hs-identifier">mapVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#zipVarEnv"><span class="hs-identifier">zipVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#modifyVarEnv"><span class="hs-identifier">modifyVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#modifyVarEnv_Directly"><span class="hs-identifier">modifyVarEnv_Directly</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#isEmptyVarEnv"><span class="hs-identifier">isEmptyVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#elemVarEnvByKey"><span class="hs-identifier">elemVarEnvByKey</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#filterVarEnv"><span class="hs-identifier">filterVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#restrictVarEnv"><span class="hs-identifier">restrictVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#partitionVarEnv"><span class="hs-identifier">partitionVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Deterministic Var environments (maps)</span></span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier">DVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DIdEnv"><span class="hs-identifier">DIdEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DTyVarEnv"><span class="hs-identifier">DTyVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Manipulating these environments</span></span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#emptyDVarEnv"><span class="hs-identifier">emptyDVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#mkDVarEnv"><span class="hs-identifier">mkDVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#dVarEnvElts"><span class="hs-identifier">dVarEnvElts</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#extendDVarEnv"><span class="hs-identifier">extendDVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#extendDVarEnv_C"><span class="hs-identifier">extendDVarEnv_C</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#extendDVarEnvList"><span class="hs-identifier">extendDVarEnvList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#lookupDVarEnv"><span class="hs-identifier">lookupDVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#elemDVarEnv"><span class="hs-identifier">elemDVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#isEmptyDVarEnv"><span class="hs-identifier">isEmptyDVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#foldDVarEnv"><span class="hs-identifier">foldDVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#nonDetStrictFoldDVarEnv"><span class="hs-identifier">nonDetStrictFoldDVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#mapDVarEnv"><span class="hs-identifier">mapDVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#filterDVarEnv"><span class="hs-identifier">filterDVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#modifyDVarEnv"><span class="hs-identifier">modifyDVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#alterDVarEnv"><span class="hs-identifier">alterDVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#plusDVarEnv"><span class="hs-identifier">plusDVarEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#plusDVarEnv_C"><span class="hs-identifier">plusDVarEnv_C</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#unitDVarEnv"><span class="hs-identifier">unitDVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#delDVarEnv"><span class="hs-identifier">delDVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#delDVarEnvList"><span class="hs-identifier">delDVarEnvList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#minusDVarEnv"><span class="hs-identifier">minusDVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#partitionDVarEnv"><span class="hs-identifier">partitionDVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#anyDVarEnv"><span class="hs-identifier">anyDVarEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span>        </span><span class="annot"><span class="hs-comment">-- * The InScopeSet type</span></span><span>
</span><span id="line-49"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier">InScopeSet</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Operations on InScopeSets</span></span><span>
</span><span id="line-52"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#emptyInScopeSet"><span class="hs-identifier">emptyInScopeSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#mkInScopeSet"><span class="hs-identifier">mkInScopeSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#delInScopeSet"><span class="hs-identifier">delInScopeSet</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-53"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#extendInScopeSet"><span class="hs-identifier">extendInScopeSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#extendInScopeSetList"><span class="hs-identifier">extendInScopeSetList</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#extendInScopeSetSet"><span class="hs-identifier">extendInScopeSetSet</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-54"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#getInScopeVars"><span class="hs-identifier">getInScopeVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#lookupInScope"><span class="hs-identifier">lookupInScope</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#lookupInScope_Directly"><span class="hs-identifier">lookupInScope_Directly</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-55"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#unionInScope"><span class="hs-identifier">unionInScope</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#elemInScopeSet"><span class="hs-identifier">elemInScopeSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#uniqAway"><span class="hs-identifier">uniqAway</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-56"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#varSetInScope"><span class="hs-identifier">varSetInScope</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-57"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#unsafeGetFreshLocalUnique"><span class="hs-identifier">unsafeGetFreshLocalUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span>        </span><span class="annot"><span class="hs-comment">-- * The RnEnv2 type</span></span><span>
</span><span id="line-60"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier">RnEnv2</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Operations on RnEnv2s</span></span><span>
</span><span id="line-63"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#mkRnEnv2"><span class="hs-identifier">mkRnEnv2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnBndr2"><span class="hs-identifier">rnBndr2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnBndrs2"><span class="hs-identifier">rnBndrs2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnBndr2_var"><span class="hs-identifier">rnBndr2_var</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-64"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnOccL"><span class="hs-identifier">rnOccL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnOccR"><span class="hs-identifier">rnOccR</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#inRnEnvL"><span class="hs-identifier">inRnEnvL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#inRnEnvR"><span class="hs-identifier">inRnEnvR</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnOccL_maybe"><span class="hs-identifier">rnOccL_maybe</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnOccR_maybe"><span class="hs-identifier">rnOccR_maybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-65"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnBndrL"><span class="hs-identifier">rnBndrL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnBndrR"><span class="hs-identifier">rnBndrR</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#nukeRnEnvL"><span class="hs-identifier">nukeRnEnvL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#nukeRnEnvR"><span class="hs-identifier">nukeRnEnvR</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnSwap"><span class="hs-identifier">rnSwap</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-66"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#delBndrL"><span class="hs-identifier">delBndrL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#delBndrR"><span class="hs-identifier">delBndrR</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#delBndrsL"><span class="hs-identifier">delBndrsL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#delBndrsR"><span class="hs-identifier">delBndrsR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-67"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#addRnInScopeSet"><span class="hs-identifier">addRnInScopeSet</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-68"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnEtaL"><span class="hs-identifier">rnEtaL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnEtaR"><span class="hs-identifier">rnEtaR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-69"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnInScope"><span class="hs-identifier">rnInScope</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnInScopeSet"><span class="hs-identifier">rnInScopeSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#lookupRnInScope"><span class="hs-identifier">lookupRnInScope</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-70"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnEnvL"><span class="hs-identifier">rnEnvL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnEnvR"><span class="hs-identifier">rnEnvR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span>        </span><span class="annot"><span class="hs-comment">-- * TidyEnv and its operation</span></span><span>
</span><span id="line-73"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier">TidyEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-74"></span><span>        </span><span class="annot"><a href="GHC.Types.Var.Env.html#emptyTidyEnv"><span class="hs-identifier">emptyTidyEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#mkEmptyTidyEnv"><span class="hs-identifier">mkEmptyTidyEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#delTidyEnvList"><span class="hs-identifier">delTidyEnvList</span></a></span><span>
</span><span id="line-75"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-78"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.IntMap.Strict.html#"><span class="hs-identifier">Data.IntMap.Strict</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">IntMap</span></span><span> </span><span class="hs-comment">-- TODO: Move this to UniqFM</span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html"><span class="hs-identifier">GHC.Types.Name.Occurrence</span></a></span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-82"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Var</span></span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html"><span class="hs-identifier">GHC.Types.Var.Set</span></a></span><span>
</span><span id="line-84"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html"><span class="hs-identifier">GHC.Types.Unique.Set</span></a></span><span>
</span><span id="line-85"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html"><span class="hs-identifier">GHC.Types.Unique.FM</span></a></span><span>
</span><span id="line-86"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.DFM.html"><span class="hs-identifier">GHC.Types.Unique.DFM</span></a></span><span>
</span><span id="line-87"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-88"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-89"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Maybe.html"><span class="hs-identifier">GHC.Data.Maybe</span></a></span><span>
</span><span id="line-90"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
                In-scope sets
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="hs-comment">-- | A set of variables that are in scope at some point</span><span>
</span><span id="line-101"></span><span class="hs-comment">-- &quot;Secrets of the Glasgow Haskell Compiler inliner&quot; Section 3.2 provides</span><span>
</span><span id="line-102"></span><span class="hs-comment">-- the motivation for this abstraction.</span><span>
</span><span id="line-103"></span><span class="hs-keyword">newtype</span><span> </span><span id="InScopeSet"><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-var">InScopeSet</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="InScope"><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-var">InScope</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-104"></span><span>        </span><span class="hs-comment">-- Note [Lookups in in-scope set]</span><span>
</span><span id="line-105"></span><span>        </span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-106"></span><span>        </span><span class="hs-comment">-- We store a VarSet here, but we use this for lookups rather than just</span><span>
</span><span id="line-107"></span><span>        </span><span class="hs-comment">-- membership tests. Typically the InScopeSet contains the canonical</span><span>
</span><span id="line-108"></span><span>        </span><span class="hs-comment">-- version of the variable (e.g. with an informative unfolding), so this</span><span>
</span><span id="line-109"></span><span>        </span><span class="hs-comment">-- lookup is useful (see, for instance, Note [In-scope set as a</span><span>
</span><span id="line-110"></span><span>        </span><span class="hs-comment">-- substitution]).</span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680811333"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-113"></span><span>  </span><span id="local-6989586621680811329"><span class="annot"><span class="annottext">ppr :: InScopeSet -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-type">InScope</span></a></span><span> </span><span id="local-6989586621680811327"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811327"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-114"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;InScope&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-115"></span><span>    </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#fsep"><span class="hs-identifier hs-var">fsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Var -&gt; SDoc) -&gt; [Var] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; SDoc) -&gt; (Var -&gt; Name) -&gt; Var -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; Name
</span><a href="GHC.Types.Var.html#varName"><span class="hs-identifier hs-var hs-var">Var.varName</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VarSet -&gt; [Var]
forall elt. UniqSet elt -&gt; [elt]
</span><a href="GHC.Types.Unique.Set.html#nonDetEltsUniqSet"><span class="hs-identifier hs-var">nonDetEltsUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811327"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-116"></span><span>                      </span><span class="hs-comment">-- It's OK to use nonDetEltsUniqSet here because it's</span><span>
</span><span id="line-117"></span><span>                      </span><span class="hs-comment">-- only for pretty printing</span><span>
</span><span id="line-118"></span><span>                      </span><span class="hs-comment">-- In-scope sets get big, and with -dppr-debug</span><span>
</span><span id="line-119"></span><span>                      </span><span class="hs-comment">-- the output is overwhelming</span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span class="annot"><a href="GHC.Types.Var.Env.html#emptyInScopeSet"><span class="hs-identifier hs-type">emptyInScopeSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span>
</span><span id="line-122"></span><span id="emptyInScopeSet"><span class="annot"><span class="annottext">emptyInScopeSet :: InScopeSet
</span><a href="GHC.Types.Var.Env.html#emptyInScopeSet"><span class="hs-identifier hs-var hs-var">emptyInScopeSet</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-var">InScope</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="GHC.Types.Var.Set.html#emptyVarSet"><span class="hs-identifier hs-var">emptyVarSet</span></a></span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span class="annot"><a href="GHC.Types.Var.Env.html#getInScopeVars"><span class="hs-identifier hs-type">getInScopeVars</span></a></span><span> </span><span class="hs-glyph">::</span><span>  </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span>
</span><span id="line-125"></span><span id="getInScopeVars"><span class="annot"><span class="annottext">getInScopeVars :: InScopeSet -&gt; VarSet
</span><a href="GHC.Types.Var.Env.html#getInScopeVars"><span class="hs-identifier hs-var hs-var">getInScopeVars</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-type">InScope</span></a></span><span> </span><span id="local-6989586621680811318"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811318"><span class="hs-identifier hs-var">vs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811318"><span class="hs-identifier hs-var">vs</span></a></span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="annot"><a href="GHC.Types.Var.Env.html#mkInScopeSet"><span class="hs-identifier hs-type">mkInScopeSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span>
</span><span id="line-128"></span><span id="mkInScopeSet"><span class="annot"><span class="annottext">mkInScopeSet :: VarSet -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#mkInScopeSet"><span class="hs-identifier hs-var hs-var">mkInScopeSet</span></a></span></span><span> </span><span id="local-6989586621680811317"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811317"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-var">InScope</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811317"><span class="hs-identifier hs-var">in_scope</span></a></span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span class="annot"><a href="GHC.Types.Var.Env.html#extendInScopeSet"><span class="hs-identifier hs-type">extendInScopeSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span>
</span><span id="line-131"></span><span id="extendInScopeSet"><span class="annot"><span class="annottext">extendInScopeSet :: InScopeSet -&gt; Var -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#extendInScopeSet"><span class="hs-identifier hs-var hs-var">extendInScopeSet</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-type">InScope</span></a></span><span> </span><span id="local-6989586621680811316"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811316"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811315"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811315"><span class="hs-identifier hs-var">v</span></a></span></span><span>
</span><span id="line-132"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-var">InScope</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VarSet -&gt; Var -&gt; VarSet
</span><a href="GHC.Types.Var.Set.html#extendVarSet"><span class="hs-identifier hs-var">extendVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811316"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811315"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span class="annot"><a href="GHC.Types.Var.Env.html#extendInScopeSetList"><span class="hs-identifier hs-type">extendInScopeSetList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span>
</span><span id="line-135"></span><span id="extendInScopeSetList"><span class="annot"><span class="annottext">extendInScopeSetList :: InScopeSet -&gt; [Var] -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#extendInScopeSetList"><span class="hs-identifier hs-var hs-var">extendInScopeSetList</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-type">InScope</span></a></span><span> </span><span id="local-6989586621680811313"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811313"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811312"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811312"><span class="hs-identifier hs-var">vs</span></a></span></span><span>
</span><span id="line-136"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-var">InScope</span></a></span><span> </span><span class="annot"><span class="annottext">(VarSet -&gt; InScopeSet) -&gt; VarSet -&gt; InScopeSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(VarSet -&gt; Var -&gt; VarSet) -&gt; VarSet -&gt; [Var] -&gt; VarSet
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; Var -&gt; VarSet
</span><a href="GHC.Types.Var.Set.html#extendVarSet"><span class="hs-identifier hs-var">extendVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811313"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811312"><span class="hs-identifier hs-var">vs</span></a></span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="annot"><a href="GHC.Types.Var.Env.html#extendInScopeSetSet"><span class="hs-identifier hs-type">extendInScopeSetSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span>
</span><span id="line-139"></span><span id="extendInScopeSetSet"><span class="annot"><span class="annottext">extendInScopeSetSet :: InScopeSet -&gt; VarSet -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#extendInScopeSetSet"><span class="hs-identifier hs-var hs-var">extendInScopeSetSet</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-type">InScope</span></a></span><span> </span><span id="local-6989586621680811310"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811310"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811309"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811309"><span class="hs-identifier hs-var">vs</span></a></span></span><span>
</span><span id="line-140"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-var">InScope</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811310"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; VarSet -&gt; VarSet
</span><a href="GHC.Types.Var.Set.html#unionVarSet"><span class="hs-operator hs-var">`unionVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811309"><span class="hs-identifier hs-var">vs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span class="annot"><a href="GHC.Types.Var.Env.html#delInScopeSet"><span class="hs-identifier hs-type">delInScopeSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span>
</span><span id="line-143"></span><span id="delInScopeSet"><span class="annot"><span class="annottext">delInScopeSet :: InScopeSet -&gt; Var -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#delInScopeSet"><span class="hs-identifier hs-var hs-var">delInScopeSet</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-type">InScope</span></a></span><span> </span><span id="local-6989586621680811307"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811307"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811306"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811306"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-var">InScope</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811307"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; Var -&gt; VarSet
</span><a href="GHC.Types.Var.Set.html#delVarSet"><span class="hs-operator hs-var">`delVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811306"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span class="annot"><a href="GHC.Types.Var.Env.html#elemInScopeSet"><span class="hs-identifier hs-type">elemInScopeSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-146"></span><span id="elemInScopeSet"><span class="annot"><span class="annottext">elemInScopeSet :: Var -&gt; InScopeSet -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#elemInScopeSet"><span class="hs-identifier hs-var hs-var">elemInScopeSet</span></a></span></span><span> </span><span id="local-6989586621680811304"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811304"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-type">InScope</span></a></span><span> </span><span id="local-6989586621680811303"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811303"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811304"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; VarSet -&gt; Bool
</span><a href="GHC.Types.Var.Set.html#elemVarSet"><span class="hs-operator hs-var">`elemVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811303"><span class="hs-identifier hs-var">in_scope</span></a></span><span>
</span><span id="line-147"></span><span>
</span><span id="line-148"></span><span class="hs-comment">-- | Look up a variable the 'InScopeSet'.  This lets you map from</span><span>
</span><span id="line-149"></span><span class="hs-comment">-- the variable's identity (unique) to its full value.</span><span>
</span><span id="line-150"></span><span class="annot"><a href="GHC.Types.Var.Env.html#lookupInScope"><span class="hs-identifier hs-type">lookupInScope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span>
</span><span id="line-151"></span><span id="lookupInScope"><span class="annot"><span class="annottext">lookupInScope :: InScopeSet -&gt; Var -&gt; Maybe Var
</span><a href="GHC.Types.Var.Env.html#lookupInScope"><span class="hs-identifier hs-var hs-var">lookupInScope</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-type">InScope</span></a></span><span> </span><span id="local-6989586621680811301"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811301"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811300"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811300"><span class="hs-identifier hs-var">v</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; Var -&gt; Maybe Var
</span><a href="GHC.Types.Var.Set.html#lookupVarSet"><span class="hs-identifier hs-var">lookupVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811301"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811300"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span class="annot"><a href="GHC.Types.Var.Env.html#lookupInScope_Directly"><span class="hs-identifier hs-type">lookupInScope_Directly</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span>
</span><span id="line-154"></span><span id="lookupInScope_Directly"><span class="annot"><span class="annottext">lookupInScope_Directly :: InScopeSet -&gt; Unique -&gt; Maybe Var
</span><a href="GHC.Types.Var.Env.html#lookupInScope_Directly"><span class="hs-identifier hs-var hs-var">lookupInScope_Directly</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-type">InScope</span></a></span><span> </span><span id="local-6989586621680811298"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811298"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811297"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680811297"><span class="hs-identifier hs-var">uniq</span></a></span></span><span>
</span><span id="line-155"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; Unique -&gt; Maybe Var
</span><a href="GHC.Types.Var.Set.html#lookupVarSet_Directly"><span class="hs-identifier hs-var">lookupVarSet_Directly</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811298"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680811297"><span class="hs-identifier hs-var">uniq</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span class="annot"><a href="GHC.Types.Var.Env.html#unionInScope"><span class="hs-identifier hs-type">unionInScope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span>
</span><span id="line-158"></span><span id="unionInScope"><span class="annot"><span class="annottext">unionInScope :: InScopeSet -&gt; InScopeSet -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#unionInScope"><span class="hs-identifier hs-var hs-var">unionInScope</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-type">InScope</span></a></span><span> </span><span id="local-6989586621680811295"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811295"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-type">InScope</span></a></span><span> </span><span id="local-6989586621680811294"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811294"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-159"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-var">InScope</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811295"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; VarSet -&gt; VarSet
</span><a href="GHC.Types.Var.Set.html#unionVarSet"><span class="hs-operator hs-var">`unionVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811294"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span class="annot"><a href="GHC.Types.Var.Env.html#varSetInScope"><span class="hs-identifier hs-type">varSetInScope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-162"></span><span id="varSetInScope"><span class="annot"><span class="annottext">varSetInScope :: VarSet -&gt; InScopeSet -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#varSetInScope"><span class="hs-identifier hs-var hs-var">varSetInScope</span></a></span></span><span> </span><span id="local-6989586621680811293"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811293"><span class="hs-identifier hs-var">vars</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-type">InScope</span></a></span><span> </span><span id="local-6989586621680811292"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811292"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811293"><span class="hs-identifier hs-var">vars</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; VarSet -&gt; Bool
</span><a href="GHC.Types.Var.Set.html#subVarSet"><span class="hs-operator hs-var">`subVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811292"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-163"></span><span>
</span><span id="line-164"></span><span class="hs-comment">{-
Note [Local uniques]
~~~~~~~~~~~~~~~~~~~~
Sometimes one must create conjure up a unique which is unique in a particular
context (but not necessarily globally unique). For instance, one might need to
create a fresh local identifier which does not shadow any of the locally
in-scope variables.  For this we purpose we provide 'uniqAway'.

'uniqAway' is implemented in terms of the 'unsafeGetFreshLocalUnique'
operation, which generates an unclaimed 'Unique' from an 'InScopeSet'. To
ensure that we do not conflict with uniques allocated by future allocations
from 'UniqSupply's, Uniques generated by 'unsafeGetFreshLocalUnique' are
allocated into a dedicated region of the unique space (namely the X tag).

Note that one must be quite carefully when using uniques generated in this way
since they are only locally unique. In particular, two successive calls to
'uniqAway' on the same 'InScopeSet' will produce the same unique.
 -}</span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span class="hs-comment">-- | @uniqAway in_scope v@ finds a unique that is not used in the</span><span>
</span><span id="line-184"></span><span class="hs-comment">-- in-scope set, and gives that to v. See Note [Local uniques].</span><span>
</span><span id="line-185"></span><span class="annot"><a href="GHC.Types.Var.Env.html#uniqAway"><span class="hs-identifier hs-type">uniqAway</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span>
</span><span id="line-186"></span><span class="hs-comment">-- It starts with v's current unique, of course, in the hope that it won't</span><span>
</span><span id="line-187"></span><span class="hs-comment">-- have to change, and thereafter uses the successor to the last derived unique</span><span>
</span><span id="line-188"></span><span class="hs-comment">-- found in the in-scope set.</span><span>
</span><span id="line-189"></span><span id="uniqAway"><span class="annot"><span class="annottext">uniqAway :: InScopeSet -&gt; Var -&gt; Var
</span><a href="GHC.Types.Var.Env.html#uniqAway"><span class="hs-identifier hs-var hs-var">uniqAway</span></a></span></span><span> </span><span id="local-6989586621680811290"><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811290"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680811289"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811289"><span class="hs-identifier hs-var">var</span></a></span></span><span>
</span><span id="line-190"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811289"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; InScopeSet -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#elemInScopeSet"><span class="hs-operator hs-var">`elemInScopeSet`</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811290"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; Var
</span><a href="GHC.Types.Var.Env.html#uniqAway%27"><span class="hs-identifier hs-var">uniqAway'</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811290"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811289"><span class="hs-identifier hs-var">var</span></a></span><span>      </span><span class="hs-comment">-- Make a new one</span><span>
</span><span id="line-191"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811289"><span class="hs-identifier hs-var">var</span></a></span><span>                         </span><span class="hs-comment">-- Nothing to do</span><span>
</span><span id="line-192"></span><span>
</span><span id="line-193"></span><span class="annot"><a href="GHC.Types.Var.Env.html#uniqAway%27"><span class="hs-identifier hs-type">uniqAway'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span>
</span><span id="line-194"></span><span class="hs-comment">-- This one *always* makes up a new variable</span><span>
</span><span id="line-195"></span><span id="uniqAway%27"><span class="annot"><span class="annottext">uniqAway' :: InScopeSet -&gt; Var -&gt; Var
</span><a href="GHC.Types.Var.Env.html#uniqAway%27"><span class="hs-identifier hs-var hs-var">uniqAway'</span></a></span></span><span> </span><span id="local-6989586621680811287"><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811287"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span id="local-6989586621680811286"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811286"><span class="hs-identifier hs-var">var</span></a></span></span><span>
</span><span id="line-196"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; Unique -&gt; Var
</span><a href="GHC.Types.Var.html#setVarUnique"><span class="hs-identifier hs-var">setVarUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811286"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InScopeSet -&gt; Unique
</span><a href="GHC.Types.Var.Env.html#unsafeGetFreshLocalUnique"><span class="hs-identifier hs-var">unsafeGetFreshLocalUnique</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811287"><span class="hs-identifier hs-var">in_scope</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-197"></span><span>
</span><span id="line-198"></span><span class="hs-comment">-- | @unsafeGetFreshUnique in_scope@ finds a unique that is not in-scope in the</span><span>
</span><span id="line-199"></span><span class="hs-comment">-- given 'InScopeSet'. This must be used very carefully since one can very easily</span><span>
</span><span id="line-200"></span><span class="hs-comment">-- introduce non-unique 'Unique's this way. See Note [Local uniques].</span><span>
</span><span id="line-201"></span><span class="annot"><a href="GHC.Types.Var.Env.html#unsafeGetFreshLocalUnique"><span class="hs-identifier hs-type">unsafeGetFreshLocalUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-202"></span><span id="unsafeGetFreshLocalUnique"><span class="annot"><span class="annottext">unsafeGetFreshLocalUnique :: InScopeSet -&gt; Unique
</span><a href="GHC.Types.Var.Env.html#unsafeGetFreshLocalUnique"><span class="hs-identifier hs-var hs-var">unsafeGetFreshLocalUnique</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#InScope"><span class="hs-identifier hs-type">InScope</span></a></span><span> </span><span id="local-6989586621680811284"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811284"><span class="hs-identifier hs-var">set</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-203"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680811283"><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621680811283"><span class="hs-identifier hs-var">uniq</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Var
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Key -&gt; IntMap Var -&gt; Maybe (Key, Var)
forall a. Key -&gt; IntMap a -&gt; Maybe (Key, a)
</span><a href="../../containers/src/Data.IntMap.Internal.html#lookupLT"><span class="hs-identifier hs-var">IntMap.lookupLT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique -&gt; Key
</span><a href="GHC.Types.Unique.html#getKey"><span class="hs-identifier hs-var">getKey</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Types.Unique.html#maxLocalUnique"><span class="hs-identifier hs-var">maxLocalUnique</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; IntMap Var
forall key elt. UniqFM key elt -&gt; IntMap elt
</span><a href="GHC.Types.Unique.FM.html#ufmToIntMap"><span class="hs-identifier hs-var">ufmToIntMap</span></a></span><span> </span><span class="annot"><span class="annottext">(UniqFM Var Var -&gt; IntMap Var) -&gt; UniqFM Var Var -&gt; IntMap Var
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; UniqFM Var Var
forall a. UniqSet a -&gt; UniqFM a a
</span><a href="GHC.Types.Unique.Set.html#getUniqSet"><span class="hs-identifier hs-var">getUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811284"><span class="hs-identifier hs-var">set</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-204"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680811277"><span class="annot"><span class="annottext">uniq' :: Unique
</span><a href="#local-6989586621680811277"><span class="hs-identifier hs-var hs-var">uniq'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Key -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkLocalUnique"><span class="hs-identifier hs-var">mkLocalUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Key
</span><a href="#local-6989586621680811283"><span class="hs-identifier hs-var">uniq</span></a></span><span>
</span><span id="line-205"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680811277"><span class="hs-identifier hs-var">uniq'</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#ltUnique"><span class="hs-operator hs-var">`ltUnique`</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Types.Unique.html#minLocalUnique"><span class="hs-identifier hs-var">minLocalUnique</span></a></span><span>
</span><span id="line-206"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique
</span><a href="GHC.Types.Unique.html#incrUnique"><span class="hs-identifier hs-var">incrUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680811277"><span class="hs-identifier hs-var">uniq'</span></a></span><span>
</span><span id="line-207"></span><span>
</span><span id="line-208"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-209"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Types.Unique.html#minLocalUnique"><span class="hs-identifier hs-var">minLocalUnique</span></a></span><span>
</span><span id="line-210"></span><span>
</span><span id="line-211"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
                Dual renaming
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span class="hs-comment">-- | Rename Environment 2</span><span>
</span><span id="line-220"></span><span class="hs-comment">--</span><span>
</span><span id="line-221"></span><span class="hs-comment">-- When we are comparing (or matching) types or terms, we are faced with</span><span>
</span><span id="line-222"></span><span class="hs-comment">-- \&quot;going under\&quot; corresponding binders.  E.g. when comparing:</span><span>
</span><span id="line-223"></span><span class="hs-comment">--</span><span>
</span><span id="line-224"></span><span class="hs-comment">-- &gt; \x. e1     ~   \y. e2</span><span>
</span><span id="line-225"></span><span class="hs-comment">--</span><span>
</span><span id="line-226"></span><span class="hs-comment">-- Basically we want to rename [@x@ -&gt; @y@] or [@y@ -&gt; @x@], but there are lots of</span><span>
</span><span id="line-227"></span><span class="hs-comment">-- things we must be careful of.  In particular, @x@ might be free in @e2@, or</span><span>
</span><span id="line-228"></span><span class="hs-comment">-- y in @e1@.  So the idea is that we come up with a fresh binder that is free</span><span>
</span><span id="line-229"></span><span class="hs-comment">-- in neither, and rename @x@ and @y@ respectively.  That means we must maintain:</span><span>
</span><span id="line-230"></span><span class="hs-comment">--</span><span>
</span><span id="line-231"></span><span class="hs-comment">-- 1. A renaming for the left-hand expression</span><span>
</span><span id="line-232"></span><span class="hs-comment">--</span><span>
</span><span id="line-233"></span><span class="hs-comment">-- 2. A renaming for the right-hand expressions</span><span>
</span><span id="line-234"></span><span class="hs-comment">--</span><span>
</span><span id="line-235"></span><span class="hs-comment">-- 3. An in-scope set</span><span>
</span><span id="line-236"></span><span class="hs-comment">--</span><span>
</span><span id="line-237"></span><span class="hs-comment">-- Furthermore, when matching, we want to be able to have an 'occurs check',</span><span>
</span><span id="line-238"></span><span class="hs-comment">-- to prevent:</span><span>
</span><span id="line-239"></span><span class="hs-comment">--</span><span>
</span><span id="line-240"></span><span class="hs-comment">-- &gt; \x. f   ~   \y. y</span><span>
</span><span id="line-241"></span><span class="hs-comment">--</span><span>
</span><span id="line-242"></span><span class="hs-comment">-- matching with [@f@ -&gt; @y@].  So for each expression we want to know that set of</span><span>
</span><span id="line-243"></span><span class="hs-comment">-- locally-bound variables. That is precisely the domain of the mappings 1.</span><span>
</span><span id="line-244"></span><span class="hs-comment">-- and 2., but we must ensure that we always extend the mappings as we go in.</span><span>
</span><span id="line-245"></span><span class="hs-comment">--</span><span>
</span><span id="line-246"></span><span class="hs-comment">-- All of this information is bundled up in the 'RnEnv2'</span><span>
</span><span id="line-247"></span><span class="hs-keyword">data</span><span> </span><span id="RnEnv2"><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-var">RnEnv2</span></a></span></span><span>
</span><span id="line-248"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="RV2"><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-var">RV2</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="envL"><span class="annot"><span class="annottext">RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var hs-var">envL</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span>        </span><span class="hs-comment">-- Renaming for Left term</span><span>
</span><span id="line-249"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="envR"><span class="annot"><span class="annottext">RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var hs-var">envR</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span>        </span><span class="hs-comment">-- Renaming for Right term</span><span>
</span><span id="line-250"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="in_scope"><span class="annot"><span class="annottext">RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var hs-var">in_scope</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-special">}</span><span>      </span><span class="hs-comment">-- In scope in left or right terms</span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span class="hs-comment">-- The renamings envL and envR are *guaranteed* to contain a binding</span><span>
</span><span id="line-253"></span><span class="hs-comment">-- for every variable bound as we go into the term, even if it is not</span><span>
</span><span id="line-254"></span><span class="hs-comment">-- renamed.  That way we can ask what variables are locally bound</span><span>
</span><span id="line-255"></span><span class="hs-comment">-- (inRnEnvL, inRnEnvR)</span><span>
</span><span id="line-256"></span><span>
</span><span id="line-257"></span><span class="annot"><a href="GHC.Types.Var.Env.html#mkRnEnv2"><span class="hs-identifier hs-type">mkRnEnv2</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span>
</span><span id="line-258"></span><span id="mkRnEnv2"><span class="annot"><span class="annottext">mkRnEnv2 :: InScopeSet -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#mkRnEnv2"><span class="hs-identifier hs-var hs-var">mkRnEnv2</span></a></span></span><span> </span><span id="local-6989586621680811267"><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811267"><span class="hs-identifier hs-var">vars</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RV2 :: UniqFM Var Var -&gt; UniqFM Var Var -&gt; InScopeSet -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span>     </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
forall a. VarEnv a
</span><a href="GHC.Types.Var.Env.html#emptyVarEnv"><span class="hs-identifier hs-var">emptyVarEnv</span></a></span><span>
</span><span id="line-259"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">envR :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
forall a. VarEnv a
</span><a href="GHC.Types.Var.Env.html#emptyVarEnv"><span class="hs-identifier hs-var">emptyVarEnv</span></a></span><span>
</span><span id="line-260"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811267"><span class="hs-identifier hs-var">vars</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span class="annot"><a href="GHC.Types.Var.Env.html#addRnInScopeSet"><span class="hs-identifier hs-type">addRnInScopeSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span>
</span><span id="line-263"></span><span id="addRnInScopeSet"><span class="annot"><span class="annottext">addRnInScopeSet :: RnEnv2 -&gt; VarSet -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#addRnInScopeSet"><span class="hs-identifier hs-var hs-var">addRnInScopeSet</span></a></span></span><span> </span><span id="local-6989586621680811266"><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811266"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621680811265"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811265"><span class="hs-identifier hs-var">vs</span></a></span></span><span>
</span><span id="line-264"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; Bool
</span><a href="GHC.Types.Var.Set.html#isEmptyVarSet"><span class="hs-identifier hs-var">isEmptyVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811265"><span class="hs-identifier hs-var">vs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811266"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-265"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811266"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">in_scope :: InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; VarSet -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#extendInScopeSetSet"><span class="hs-identifier hs-var">extendInScopeSetSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811266"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811265"><span class="hs-identifier hs-var">vs</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-266"></span><span>
</span><span id="line-267"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnInScope"><span class="hs-identifier hs-type">rnInScope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-268"></span><span id="rnInScope"><span class="annot"><span class="annottext">rnInScope :: Var -&gt; RnEnv2 -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#rnInScope"><span class="hs-identifier hs-var hs-var">rnInScope</span></a></span></span><span> </span><span id="local-6989586621680811263"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811263"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621680811262"><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811262"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811263"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; InScopeSet -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#elemInScopeSet"><span class="hs-operator hs-var">`elemInScopeSet`</span></a></span><span> </span><span class="annot"><span class="annottext">RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811262"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-269"></span><span>
</span><span id="line-270"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnInScopeSet"><span class="hs-identifier hs-type">rnInScopeSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#InScopeSet"><span class="hs-identifier hs-type">InScopeSet</span></a></span><span>
</span><span id="line-271"></span><span id="rnInScopeSet"><span class="annot"><span class="annottext">rnInScopeSet :: RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#rnInScopeSet"><span class="hs-identifier hs-var hs-var">rnInScopeSet</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var hs-var">in_scope</span></a></span><span>
</span><span id="line-272"></span><span>
</span><span id="line-273"></span><span class="hs-comment">-- | Retrieve the left mapping</span><span>
</span><span id="line-274"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnEnvL"><span class="hs-identifier hs-type">rnEnvL</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span>
</span><span id="line-275"></span><span id="rnEnvL"><span class="annot"><span class="annottext">rnEnvL :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#rnEnvL"><span class="hs-identifier hs-var hs-var">rnEnvL</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var hs-var">envL</span></a></span><span>
</span><span id="line-276"></span><span>
</span><span id="line-277"></span><span class="hs-comment">-- | Retrieve the right mapping</span><span>
</span><span id="line-278"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnEnvR"><span class="hs-identifier hs-type">rnEnvR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span>
</span><span id="line-279"></span><span id="rnEnvR"><span class="annot"><span class="annottext">rnEnvR :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#rnEnvR"><span class="hs-identifier hs-var hs-var">rnEnvR</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var hs-var">envR</span></a></span><span>
</span><span id="line-280"></span><span>
</span><span id="line-281"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnBndrs2"><span class="hs-identifier hs-type">rnBndrs2</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span>
</span><span id="line-282"></span><span class="hs-comment">-- ^ Applies 'rnBndr2' to several variables: the two variable lists must be of equal length</span><span>
</span><span id="line-283"></span><span id="rnBndrs2"><span class="annot"><span class="annottext">rnBndrs2 :: RnEnv2 -&gt; [Var] -&gt; [Var] -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#rnBndrs2"><span class="hs-identifier hs-var hs-var">rnBndrs2</span></a></span></span><span> </span><span id="local-6989586621680811261"><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811261"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621680811260"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811260"><span class="hs-identifier hs-var">bsL</span></a></span></span><span> </span><span id="local-6989586621680811259"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811259"><span class="hs-identifier hs-var">bsR</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RnEnv2 -&gt; Var -&gt; Var -&gt; RnEnv2)
-&gt; RnEnv2 -&gt; [Var] -&gt; [Var] -&gt; RnEnv2
forall acc a b. (acc -&gt; a -&gt; b -&gt; acc) -&gt; acc -&gt; [a] -&gt; [b] -&gt; acc
</span><a href="GHC.Utils.Misc.html#foldl2"><span class="hs-identifier hs-var">foldl2</span></a></span><span> </span><span class="annot"><span class="annottext">RnEnv2 -&gt; Var -&gt; Var -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#rnBndr2"><span class="hs-identifier hs-var">rnBndr2</span></a></span><span> </span><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811261"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811260"><span class="hs-identifier hs-var">bsL</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811259"><span class="hs-identifier hs-var">bsR</span></a></span><span>
</span><span id="line-284"></span><span>
</span><span id="line-285"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnBndr2"><span class="hs-identifier hs-type">rnBndr2</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span>
</span><span id="line-286"></span><span class="hs-comment">-- ^ @rnBndr2 env bL bR@ goes under a binder @bL@ in the Left term,</span><span>
</span><span id="line-287"></span><span class="hs-comment">--                       and binder @bR@ in the Right term.</span><span>
</span><span id="line-288"></span><span class="hs-comment">-- It finds a new binder, @new_b@,</span><span>
</span><span id="line-289"></span><span class="hs-comment">-- and returns an environment mapping @bL -&gt; new_b@ and @bR -&gt; new_b@</span><span>
</span><span id="line-290"></span><span id="rnBndr2"><span class="annot"><span class="annottext">rnBndr2 :: RnEnv2 -&gt; Var -&gt; Var -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#rnBndr2"><span class="hs-identifier hs-var hs-var">rnBndr2</span></a></span></span><span> </span><span id="local-6989586621680811257"><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811257"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621680811256"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811256"><span class="hs-identifier hs-var">bL</span></a></span></span><span> </span><span id="local-6989586621680811255"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811255"><span class="hs-identifier hs-var">bR</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RnEnv2, Var) -&gt; RnEnv2
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">((RnEnv2, Var) -&gt; RnEnv2) -&gt; (RnEnv2, Var) -&gt; RnEnv2
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RnEnv2 -&gt; Var -&gt; Var -&gt; (RnEnv2, Var)
</span><a href="GHC.Types.Var.Env.html#rnBndr2_var"><span class="hs-identifier hs-var">rnBndr2_var</span></a></span><span> </span><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811257"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811256"><span class="hs-identifier hs-var">bL</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811255"><span class="hs-identifier hs-var">bR</span></a></span><span>
</span><span id="line-291"></span><span>
</span><span id="line-292"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnBndr2_var"><span class="hs-identifier hs-type">rnBndr2_var</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-293"></span><span class="hs-comment">-- ^ Similar to 'rnBndr2' but returns the new variable as well as the</span><span>
</span><span id="line-294"></span><span class="hs-comment">-- new environment</span><span>
</span><span id="line-295"></span><span id="rnBndr2_var"><span class="annot"><span class="annottext">rnBndr2_var :: RnEnv2 -&gt; Var -&gt; Var -&gt; (RnEnv2, Var)
</span><a href="GHC.Types.Var.Env.html#rnBndr2_var"><span class="hs-identifier hs-var hs-var">rnBndr2_var</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811254"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811254"><span class="hs-identifier hs-var">envL</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">envR :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811253"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811253"><span class="hs-identifier hs-var">envR</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811252"><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811252"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811251"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811251"><span class="hs-identifier hs-var">bL</span></a></span></span><span> </span><span id="local-6989586621680811250"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811250"><span class="hs-identifier hs-var">bR</span></a></span></span><span>
</span><span id="line-296"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RV2 :: UniqFM Var Var -&gt; UniqFM Var Var -&gt; InScopeSet -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; Var -&gt; UniqFM Var Var
forall a. VarEnv a -&gt; Var -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-var">extendVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811254"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811251"><span class="hs-identifier hs-var">bL</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811249"><span class="hs-identifier hs-var">new_b</span></a></span><span>   </span><span class="hs-comment">-- See Note</span><span>
</span><span id="line-297"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">envR :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; Var -&gt; UniqFM Var Var
forall a. VarEnv a -&gt; Var -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-var">extendVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811253"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811250"><span class="hs-identifier hs-var">bR</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811249"><span class="hs-identifier hs-var">new_b</span></a></span><span>   </span><span class="hs-comment">-- [Rebinding]</span><span>
</span><span id="line-298"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#extendInScopeSet"><span class="hs-identifier hs-var">extendInScopeSet</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811252"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811249"><span class="hs-identifier hs-var">new_b</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811249"><span class="hs-identifier hs-var">new_b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-299"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-300"></span><span>        </span><span class="hs-comment">-- Find a new binder not in scope in either term</span><span>
</span><span id="line-301"></span><span>    </span><span id="local-6989586621680811249"><span class="annot"><span class="annottext">new_b :: Var
</span><a href="#local-6989586621680811249"><span class="hs-identifier hs-var hs-var">new_b</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811251"><span class="hs-identifier hs-var">bL</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; InScopeSet -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#elemInScopeSet"><span class="hs-operator hs-var">`elemInScopeSet`</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811252"><span class="hs-identifier hs-var">in_scope</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811251"><span class="hs-identifier hs-var">bL</span></a></span><span>
</span><span id="line-302"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811250"><span class="hs-identifier hs-var">bR</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; InScopeSet -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#elemInScopeSet"><span class="hs-operator hs-var">`elemInScopeSet`</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811252"><span class="hs-identifier hs-var">in_scope</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811250"><span class="hs-identifier hs-var">bR</span></a></span><span>
</span><span id="line-303"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; Var
</span><a href="GHC.Types.Var.Env.html#uniqAway%27"><span class="hs-identifier hs-var">uniqAway'</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811252"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811251"><span class="hs-identifier hs-var">bL</span></a></span><span>
</span><span id="line-304"></span><span>
</span><span id="line-305"></span><span>        </span><span class="hs-comment">-- Note [Rebinding]</span><span>
</span><span id="line-306"></span><span>        </span><span class="hs-comment">-- If the new var is the same as the old one, note that</span><span>
</span><span id="line-307"></span><span>        </span><span class="hs-comment">-- the extendVarEnv *deletes* any current renaming</span><span>
</span><span id="line-308"></span><span>        </span><span class="hs-comment">-- E.g.   (\x. \x. ...)  ~  (\y. \z. ...)</span><span>
</span><span id="line-309"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-310"></span><span>        </span><span class="hs-comment">--   Inside \x  \y      { [x-&gt;y], [y-&gt;y],       {y} }</span><span>
</span><span id="line-311"></span><span>        </span><span class="hs-comment">--       \x  \z         { [x-&gt;x], [y-&gt;y, z-&gt;x], {y,x} }</span><span>
</span><span id="line-312"></span><span>
</span><span id="line-313"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnBndrL"><span class="hs-identifier hs-type">rnBndrL</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-314"></span><span class="hs-comment">-- ^ Similar to 'rnBndr2' but used when there's a binder on the left</span><span>
</span><span id="line-315"></span><span class="hs-comment">-- side only.</span><span>
</span><span id="line-316"></span><span id="rnBndrL"><span class="annot"><span class="annottext">rnBndrL :: RnEnv2 -&gt; Var -&gt; (RnEnv2, Var)
</span><a href="GHC.Types.Var.Env.html#rnBndrL"><span class="hs-identifier hs-var hs-var">rnBndrL</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811248"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811248"><span class="hs-identifier hs-var">envL</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">envR :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811247"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811247"><span class="hs-identifier hs-var">envR</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811246"><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811246"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811245"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811245"><span class="hs-identifier hs-var">bL</span></a></span></span><span>
</span><span id="line-317"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RV2 :: UniqFM Var Var -&gt; UniqFM Var Var -&gt; InScopeSet -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; Var -&gt; UniqFM Var Var
forall a. VarEnv a -&gt; Var -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-var">extendVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811248"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811245"><span class="hs-identifier hs-var">bL</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811244"><span class="hs-identifier hs-var">new_b</span></a></span><span>
</span><span id="line-318"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">envR :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811247"><span class="hs-identifier hs-var">envR</span></a></span><span>
</span><span id="line-319"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#extendInScopeSet"><span class="hs-identifier hs-var">extendInScopeSet</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811246"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811244"><span class="hs-identifier hs-var">new_b</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811244"><span class="hs-identifier hs-var">new_b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-320"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-321"></span><span>    </span><span id="local-6989586621680811244"><span class="annot"><span class="annottext">new_b :: Var
</span><a href="#local-6989586621680811244"><span class="hs-identifier hs-var hs-var">new_b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; Var
</span><a href="GHC.Types.Var.Env.html#uniqAway"><span class="hs-identifier hs-var">uniqAway</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811246"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811245"><span class="hs-identifier hs-var">bL</span></a></span><span>
</span><span id="line-322"></span><span>
</span><span id="line-323"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnBndrR"><span class="hs-identifier hs-type">rnBndrR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-324"></span><span class="hs-comment">-- ^ Similar to 'rnBndr2' but used when there's a binder on the right</span><span>
</span><span id="line-325"></span><span class="hs-comment">-- side only.</span><span>
</span><span id="line-326"></span><span id="rnBndrR"><span class="annot"><span class="annottext">rnBndrR :: RnEnv2 -&gt; Var -&gt; (RnEnv2, Var)
</span><a href="GHC.Types.Var.Env.html#rnBndrR"><span class="hs-identifier hs-var hs-var">rnBndrR</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811243"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811243"><span class="hs-identifier hs-var">envL</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">envR :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811242"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811242"><span class="hs-identifier hs-var">envR</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811241"><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811241"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811240"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811240"><span class="hs-identifier hs-var">bR</span></a></span></span><span>
</span><span id="line-327"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RV2 :: UniqFM Var Var -&gt; UniqFM Var Var -&gt; InScopeSet -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envR :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; Var -&gt; UniqFM Var Var
forall a. VarEnv a -&gt; Var -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-var">extendVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811242"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811240"><span class="hs-identifier hs-var">bR</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811239"><span class="hs-identifier hs-var">new_b</span></a></span><span>
</span><span id="line-328"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">envL :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811243"><span class="hs-identifier hs-var">envL</span></a></span><span>
</span><span id="line-329"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#extendInScopeSet"><span class="hs-identifier hs-var">extendInScopeSet</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811241"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811239"><span class="hs-identifier hs-var">new_b</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811239"><span class="hs-identifier hs-var">new_b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-330"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-331"></span><span>    </span><span id="local-6989586621680811239"><span class="annot"><span class="annottext">new_b :: Var
</span><a href="#local-6989586621680811239"><span class="hs-identifier hs-var hs-var">new_b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; Var
</span><a href="GHC.Types.Var.Env.html#uniqAway"><span class="hs-identifier hs-var">uniqAway</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811241"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811240"><span class="hs-identifier hs-var">bR</span></a></span><span>
</span><span id="line-332"></span><span>
</span><span id="line-333"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnEtaL"><span class="hs-identifier hs-type">rnEtaL</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-334"></span><span class="hs-comment">-- ^ Similar to 'rnBndrL' but used for eta expansion</span><span>
</span><span id="line-335"></span><span class="hs-comment">-- See Note [Eta expansion]</span><span>
</span><span id="line-336"></span><span id="rnEtaL"><span class="annot"><span class="annottext">rnEtaL :: RnEnv2 -&gt; Var -&gt; (RnEnv2, Var)
</span><a href="GHC.Types.Var.Env.html#rnEtaL"><span class="hs-identifier hs-var hs-var">rnEtaL</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811238"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811238"><span class="hs-identifier hs-var">envL</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">envR :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811237"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811237"><span class="hs-identifier hs-var">envR</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811236"><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811236"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811235"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811235"><span class="hs-identifier hs-var">bL</span></a></span></span><span>
</span><span id="line-337"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RV2 :: UniqFM Var Var -&gt; UniqFM Var Var -&gt; InScopeSet -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; Var -&gt; UniqFM Var Var
forall a. VarEnv a -&gt; Var -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-var">extendVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811238"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811235"><span class="hs-identifier hs-var">bL</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811234"><span class="hs-identifier hs-var">new_b</span></a></span><span>
</span><span id="line-338"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">envR :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; Var -&gt; UniqFM Var Var
forall a. VarEnv a -&gt; Var -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-var">extendVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811237"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811234"><span class="hs-identifier hs-var">new_b</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811234"><span class="hs-identifier hs-var">new_b</span></a></span><span>     </span><span class="hs-comment">-- Note [Eta expansion]</span><span>
</span><span id="line-339"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#extendInScopeSet"><span class="hs-identifier hs-var">extendInScopeSet</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811236"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811234"><span class="hs-identifier hs-var">new_b</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811234"><span class="hs-identifier hs-var">new_b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-340"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-341"></span><span>    </span><span id="local-6989586621680811234"><span class="annot"><span class="annottext">new_b :: Var
</span><a href="#local-6989586621680811234"><span class="hs-identifier hs-var hs-var">new_b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; Var
</span><a href="GHC.Types.Var.Env.html#uniqAway"><span class="hs-identifier hs-var">uniqAway</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811236"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811235"><span class="hs-identifier hs-var">bL</span></a></span><span>
</span><span id="line-342"></span><span>
</span><span id="line-343"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnEtaR"><span class="hs-identifier hs-type">rnEtaR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-344"></span><span class="hs-comment">-- ^ Similar to 'rnBndr2' but used for eta expansion</span><span>
</span><span id="line-345"></span><span class="hs-comment">-- See Note [Eta expansion]</span><span>
</span><span id="line-346"></span><span id="rnEtaR"><span class="annot"><span class="annottext">rnEtaR :: RnEnv2 -&gt; Var -&gt; (RnEnv2, Var)
</span><a href="GHC.Types.Var.Env.html#rnEtaR"><span class="hs-identifier hs-var hs-var">rnEtaR</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811233"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811233"><span class="hs-identifier hs-var">envL</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">envR :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811232"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811232"><span class="hs-identifier hs-var">envR</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811231"><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811231"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811230"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811230"><span class="hs-identifier hs-var">bR</span></a></span></span><span>
</span><span id="line-347"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RV2 :: UniqFM Var Var -&gt; UniqFM Var Var -&gt; InScopeSet -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; Var -&gt; UniqFM Var Var
forall a. VarEnv a -&gt; Var -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-var">extendVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811233"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811229"><span class="hs-identifier hs-var">new_b</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811229"><span class="hs-identifier hs-var">new_b</span></a></span><span>     </span><span class="hs-comment">-- Note [Eta expansion]</span><span>
</span><span id="line-348"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">envR :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; Var -&gt; UniqFM Var Var
forall a. VarEnv a -&gt; Var -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-var">extendVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811232"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811230"><span class="hs-identifier hs-var">bR</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811229"><span class="hs-identifier hs-var">new_b</span></a></span><span>
</span><span id="line-349"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#extendInScopeSet"><span class="hs-identifier hs-var">extendInScopeSet</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811231"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811229"><span class="hs-identifier hs-var">new_b</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811229"><span class="hs-identifier hs-var">new_b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-350"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-351"></span><span>    </span><span id="local-6989586621680811229"><span class="annot"><span class="annottext">new_b :: Var
</span><a href="#local-6989586621680811229"><span class="hs-identifier hs-var hs-var">new_b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; Var
</span><a href="GHC.Types.Var.Env.html#uniqAway"><span class="hs-identifier hs-var">uniqAway</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811231"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811230"><span class="hs-identifier hs-var">bR</span></a></span><span>
</span><span id="line-352"></span><span>
</span><span id="line-353"></span><span class="annot"><a href="GHC.Types.Var.Env.html#delBndrL"><span class="hs-identifier hs-type">delBndrL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#delBndrR"><span class="hs-identifier hs-type">delBndrR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span>
</span><span id="line-354"></span><span id="delBndrL"><span class="annot"><span class="annottext">delBndrL :: RnEnv2 -&gt; Var -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#delBndrL"><span class="hs-identifier hs-var hs-var">delBndrL</span></a></span></span><span> </span><span id="local-6989586621680811228"><span class="annot"><span class="annottext">rn :: RnEnv2
</span><a href="#local-6989586621680811228"><span class="hs-identifier hs-var">rn</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811227"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811227"><span class="hs-identifier hs-var">env</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811226"><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811226"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811225"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811225"><span class="hs-identifier hs-var">v</span></a></span></span><span>
</span><span id="line-355"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811228"><span class="hs-identifier hs-var">rn</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811227"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; UniqFM Var Var
forall a. VarEnv a -&gt; Var -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#delVarEnv"><span class="hs-operator hs-var">`delVarEnv`</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811225"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811226"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#extendInScopeSet"><span class="hs-operator hs-var">`extendInScopeSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811225"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-356"></span><span id="delBndrR"><span class="annot"><span class="annottext">delBndrR :: RnEnv2 -&gt; Var -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#delBndrR"><span class="hs-identifier hs-var hs-var">delBndrR</span></a></span></span><span> </span><span id="local-6989586621680811224"><span class="annot"><span class="annottext">rn :: RnEnv2
</span><a href="#local-6989586621680811224"><span class="hs-identifier hs-var">rn</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envR :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811223"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811223"><span class="hs-identifier hs-var">env</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811222"><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811222"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811221"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811221"><span class="hs-identifier hs-var">v</span></a></span></span><span>
</span><span id="line-357"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811224"><span class="hs-identifier hs-var">rn</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envR :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811223"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; UniqFM Var Var
forall a. VarEnv a -&gt; Var -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#delVarEnv"><span class="hs-operator hs-var">`delVarEnv`</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811221"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811222"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#extendInScopeSet"><span class="hs-operator hs-var">`extendInScopeSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811221"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-358"></span><span>
</span><span id="line-359"></span><span class="annot"><a href="GHC.Types.Var.Env.html#delBndrsL"><span class="hs-identifier hs-type">delBndrsL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#delBndrsR"><span class="hs-identifier hs-type">delBndrsR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span>
</span><span id="line-360"></span><span id="delBndrsL"><span class="annot"><span class="annottext">delBndrsL :: RnEnv2 -&gt; [Var] -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#delBndrsL"><span class="hs-identifier hs-var hs-var">delBndrsL</span></a></span></span><span> </span><span id="local-6989586621680811220"><span class="annot"><span class="annottext">rn :: RnEnv2
</span><a href="#local-6989586621680811220"><span class="hs-identifier hs-var">rn</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811219"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811219"><span class="hs-identifier hs-var">env</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811218"><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811218"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811217"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811217"><span class="hs-identifier hs-var">v</span></a></span></span><span>
</span><span id="line-361"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811220"><span class="hs-identifier hs-var">rn</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811219"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; [Var] -&gt; UniqFM Var Var
forall a. VarEnv a -&gt; [Var] -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#delVarEnvList"><span class="hs-operator hs-var">`delVarEnvList`</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811217"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811218"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; [Var] -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#extendInScopeSetList"><span class="hs-operator hs-var">`extendInScopeSetList`</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811217"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-362"></span><span id="delBndrsR"><span class="annot"><span class="annottext">delBndrsR :: RnEnv2 -&gt; [Var] -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#delBndrsR"><span class="hs-identifier hs-var hs-var">delBndrsR</span></a></span></span><span> </span><span id="local-6989586621680811216"><span class="annot"><span class="annottext">rn :: RnEnv2
</span><a href="#local-6989586621680811216"><span class="hs-identifier hs-var">rn</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envR :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811215"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811215"><span class="hs-identifier hs-var">env</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811214"><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811214"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811213"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811213"><span class="hs-identifier hs-var">v</span></a></span></span><span>
</span><span id="line-363"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811216"><span class="hs-identifier hs-var">rn</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envR :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811215"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; [Var] -&gt; UniqFM Var Var
forall a. VarEnv a -&gt; [Var] -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#delVarEnvList"><span class="hs-operator hs-var">`delVarEnvList`</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811213"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811214"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; [Var] -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#extendInScopeSetList"><span class="hs-operator hs-var">`extendInScopeSetList`</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811213"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-364"></span><span>
</span><span id="line-365"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnOccL"><span class="hs-identifier hs-type">rnOccL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnOccR"><span class="hs-identifier hs-type">rnOccR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span>
</span><span id="line-366"></span><span class="hs-comment">-- ^ Look up the renaming of an occurrence in the left or right term</span><span>
</span><span id="line-367"></span><span id="rnOccL"><span class="annot"><span class="annottext">rnOccL :: RnEnv2 -&gt; Var -&gt; Var
</span><a href="GHC.Types.Var.Env.html#rnOccL"><span class="hs-identifier hs-var hs-var">rnOccL</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811212"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811212"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811211"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811211"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; Maybe Var
forall a. VarEnv a -&gt; Var -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupVarEnv"><span class="hs-identifier hs-var">lookupVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811212"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811211"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Var -&gt; Var -&gt; Var
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811211"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-368"></span><span id="rnOccR"><span class="annot"><span class="annottext">rnOccR :: RnEnv2 -&gt; Var -&gt; Var
</span><a href="GHC.Types.Var.Env.html#rnOccR"><span class="hs-identifier hs-var hs-var">rnOccR</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envR :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811209"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811209"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811208"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811208"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; Maybe Var
forall a. VarEnv a -&gt; Var -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupVarEnv"><span class="hs-identifier hs-var">lookupVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811209"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811208"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Var -&gt; Var -&gt; Var
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811208"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-369"></span><span>
</span><span id="line-370"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnOccL_maybe"><span class="hs-identifier hs-type">rnOccL_maybe</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#rnOccR_maybe"><span class="hs-identifier hs-type">rnOccR_maybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span>
</span><span id="line-371"></span><span class="hs-comment">-- ^ Look up the renaming of an occurrence in the left or right term</span><span>
</span><span id="line-372"></span><span id="rnOccL_maybe"><span class="annot"><span class="annottext">rnOccL_maybe :: RnEnv2 -&gt; Var -&gt; Maybe Var
</span><a href="GHC.Types.Var.Env.html#rnOccL_maybe"><span class="hs-identifier hs-var hs-var">rnOccL_maybe</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811207"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811207"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811206"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811206"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; Maybe Var
forall a. VarEnv a -&gt; Var -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupVarEnv"><span class="hs-identifier hs-var">lookupVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811207"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811206"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-373"></span><span id="rnOccR_maybe"><span class="annot"><span class="annottext">rnOccR_maybe :: RnEnv2 -&gt; Var -&gt; Maybe Var
</span><a href="GHC.Types.Var.Env.html#rnOccR_maybe"><span class="hs-identifier hs-var hs-var">rnOccR_maybe</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envR :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811205"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811205"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811204"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811204"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; Var -&gt; Maybe Var
forall a. VarEnv a -&gt; Var -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupVarEnv"><span class="hs-identifier hs-var">lookupVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811205"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811204"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-374"></span><span>
</span><span id="line-375"></span><span class="annot"><a href="GHC.Types.Var.Env.html#inRnEnvL"><span class="hs-identifier hs-type">inRnEnvL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#inRnEnvR"><span class="hs-identifier hs-type">inRnEnvR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-376"></span><span class="hs-comment">-- ^ Tells whether a variable is locally bound</span><span>
</span><span id="line-377"></span><span id="inRnEnvL"><span class="annot"><span class="annottext">inRnEnvL :: RnEnv2 -&gt; Var -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#inRnEnvL"><span class="hs-identifier hs-var hs-var">inRnEnvL</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811203"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811203"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811202"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811202"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811202"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; UniqFM Var Var -&gt; Bool
forall a. Var -&gt; VarEnv a -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#elemVarEnv"><span class="hs-operator hs-var">`elemVarEnv`</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811203"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-378"></span><span id="inRnEnvR"><span class="annot"><span class="annottext">inRnEnvR :: RnEnv2 -&gt; Var -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#inRnEnvR"><span class="hs-identifier hs-var hs-var">inRnEnvR</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envR :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811201"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811201"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811200"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811200"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811200"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; UniqFM Var Var -&gt; Bool
forall a. Var -&gt; VarEnv a -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#elemVarEnv"><span class="hs-operator hs-var">`elemVarEnv`</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811201"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-379"></span><span>
</span><span id="line-380"></span><span class="annot"><a href="GHC.Types.Var.Env.html#lookupRnInScope"><span class="hs-identifier hs-type">lookupRnInScope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span>
</span><span id="line-381"></span><span id="lookupRnInScope"><span class="annot"><span class="annottext">lookupRnInScope :: RnEnv2 -&gt; Var -&gt; Var
</span><a href="GHC.Types.Var.Env.html#lookupRnInScope"><span class="hs-identifier hs-var hs-var">lookupRnInScope</span></a></span></span><span> </span><span id="local-6989586621680811199"><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811199"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621680811198"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811198"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet -&gt; Var -&gt; Maybe Var
</span><a href="GHC.Types.Var.Env.html#lookupInScope"><span class="hs-identifier hs-var">lookupInScope</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var hs-var">in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811199"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811198"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Var -&gt; Var -&gt; Var
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811198"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-382"></span><span>
</span><span id="line-383"></span><span class="annot"><a href="GHC.Types.Var.Env.html#nukeRnEnvL"><span class="hs-identifier hs-type">nukeRnEnvL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#nukeRnEnvR"><span class="hs-identifier hs-type">nukeRnEnvR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span>
</span><span id="line-384"></span><span class="hs-comment">-- ^ Wipe the left or right side renaming</span><span>
</span><span id="line-385"></span><span id="nukeRnEnvL"><span class="annot"><span class="annottext">nukeRnEnvL :: RnEnv2 -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#nukeRnEnvL"><span class="hs-identifier hs-var hs-var">nukeRnEnvL</span></a></span></span><span> </span><span id="local-6989586621680811197"><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811197"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811197"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
forall a. VarEnv a
</span><a href="GHC.Types.Var.Env.html#emptyVarEnv"><span class="hs-identifier hs-var">emptyVarEnv</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-386"></span><span id="nukeRnEnvR"><span class="annot"><span class="annottext">nukeRnEnvR :: RnEnv2 -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#nukeRnEnvR"><span class="hs-identifier hs-var hs-var">nukeRnEnvR</span></a></span></span><span> </span><span id="local-6989586621680811196"><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811196"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnEnv2
</span><a href="#local-6989586621680811196"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envR :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
forall a. VarEnv a
</span><a href="GHC.Types.Var.Env.html#emptyVarEnv"><span class="hs-identifier hs-var">emptyVarEnv</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-387"></span><span>
</span><span id="line-388"></span><span class="annot"><a href="GHC.Types.Var.Env.html#rnSwap"><span class="hs-identifier hs-type">rnSwap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#RnEnv2"><span class="hs-identifier hs-type">RnEnv2</span></a></span><span>
</span><span id="line-389"></span><span class="hs-comment">-- ^ swap the meaning of left and right</span><span>
</span><span id="line-390"></span><span id="rnSwap"><span class="annot"><span class="annottext">rnSwap :: RnEnv2 -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#rnSwap"><span class="hs-identifier hs-var hs-var">rnSwap</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811195"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811195"><span class="hs-identifier hs-var">envL</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">envR :: RnEnv2 -&gt; UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811194"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811194"><span class="hs-identifier hs-var">envR</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: RnEnv2 -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680811193"><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811193"><span class="hs-identifier hs-var">in_scope</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-391"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RV2 :: UniqFM Var Var -&gt; UniqFM Var Var -&gt; InScopeSet -&gt; RnEnv2
</span><a href="GHC.Types.Var.Env.html#RV2"><span class="hs-identifier hs-type">RV2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">envL :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envL"><span class="hs-identifier hs-var">envL</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811194"><span class="hs-identifier hs-var">envR</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">envR :: UniqFM Var Var
</span><a href="GHC.Types.Var.Env.html#envR"><span class="hs-identifier hs-var">envR</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811195"><span class="hs-identifier hs-var">envL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">in_scope :: InScopeSet
</span><a href="GHC.Types.Var.Env.html#in_scope"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680811193"><span class="hs-identifier hs-var">in_scope</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-392"></span><span>
</span><span id="line-393"></span><span class="hs-comment">{-
Note [Eta expansion]
~~~~~~~~~~~~~~~~~~~~
When matching
     (\x.M) ~ N
we rename x to x' with, where x' is not in scope in
either term.  Then we want to behave as if we'd seen
     (\x'.M) ~ (\x'.N x')
Since x' isn't in scope in N, the form (\x'. N x') doesn't
capture any variables in N.  But we must nevertheless extend
the envR with a binding [x' -&gt; x'], to support the occurs check.
For example, if we don't do this, we can get silly matches like
        forall a.  (\y.a)  ~   v
succeeding with [a -&gt; v y], which is bogus of course.


************************************************************************
*                                                                      *
                Tidying
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-415"></span><span>
</span><span id="line-416"></span><span class="hs-comment">-- | Tidy Environment</span><span>
</span><span id="line-417"></span><span class="hs-comment">--</span><span>
</span><span id="line-418"></span><span class="hs-comment">-- When tidying up print names, we keep a mapping of in-scope occ-names</span><span>
</span><span id="line-419"></span><span class="hs-comment">-- (the 'TidyOccEnv') and a Var-to-Var of the current renamings</span><span>
</span><span id="line-420"></span><span class="hs-keyword">type</span><span> </span><span id="TidyEnv"><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-var">TidyEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#TidyOccEnv"><span class="hs-identifier hs-type">TidyOccEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-421"></span><span>
</span><span id="line-422"></span><span class="annot"><a href="GHC.Types.Var.Env.html#emptyTidyEnv"><span class="hs-identifier hs-type">emptyTidyEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span>
</span><span id="line-423"></span><span id="emptyTidyEnv"><span class="annot"><span class="annottext">emptyTidyEnv :: TidyEnv
</span><a href="GHC.Types.Var.Env.html#emptyTidyEnv"><span class="hs-identifier hs-var hs-var">emptyTidyEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyOccEnv
</span><a href="GHC.Types.Name.Occurrence.html#emptyTidyOccEnv"><span class="hs-identifier hs-var">emptyTidyOccEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
forall a. VarEnv a
</span><a href="GHC.Types.Var.Env.html#emptyVarEnv"><span class="hs-identifier hs-var">emptyVarEnv</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-424"></span><span>
</span><span id="line-425"></span><span class="annot"><a href="GHC.Types.Var.Env.html#mkEmptyTidyEnv"><span class="hs-identifier hs-type">mkEmptyTidyEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#TidyOccEnv"><span class="hs-identifier hs-type">TidyOccEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span>
</span><span id="line-426"></span><span id="mkEmptyTidyEnv"><span class="annot"><span class="annottext">mkEmptyTidyEnv :: TidyOccEnv -&gt; TidyEnv
</span><a href="GHC.Types.Var.Env.html#mkEmptyTidyEnv"><span class="hs-identifier hs-var hs-var">mkEmptyTidyEnv</span></a></span></span><span> </span><span id="local-6989586621680811191"><span class="annot"><span class="annottext">TidyOccEnv
</span><a href="#local-6989586621680811191"><span class="hs-identifier hs-var">occ_env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyOccEnv
</span><a href="#local-6989586621680811191"><span class="hs-identifier hs-var">occ_env</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
forall a. VarEnv a
</span><a href="GHC.Types.Var.Env.html#emptyVarEnv"><span class="hs-identifier hs-var">emptyVarEnv</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-427"></span><span>
</span><span id="line-428"></span><span class="annot"><a href="GHC.Types.Var.Env.html#delTidyEnvList"><span class="hs-identifier hs-type">delTidyEnvList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span>
</span><span id="line-429"></span><span id="delTidyEnvList"><span class="annot"><span class="annottext">delTidyEnvList :: TidyEnv -&gt; [Var] -&gt; TidyEnv
</span><a href="GHC.Types.Var.Env.html#delTidyEnvList"><span class="hs-identifier hs-var hs-var">delTidyEnvList</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680811190"><span class="annot"><span class="annottext">TidyOccEnv
</span><a href="#local-6989586621680811190"><span class="hs-identifier hs-var">occ_env</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680811189"><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811189"><span class="hs-identifier hs-var">var_env</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680811188"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811188"><span class="hs-identifier hs-var">vs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyOccEnv
</span><a href="#local-6989586621680811187"><span class="hs-identifier hs-var">occ_env'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811186"><span class="hs-identifier hs-var">var_env'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-430"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-431"></span><span>    </span><span id="local-6989586621680811187"><span class="annot"><span class="annottext">occ_env' :: TidyOccEnv
</span><a href="#local-6989586621680811187"><span class="hs-identifier hs-var hs-var">occ_env'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TidyOccEnv
</span><a href="#local-6989586621680811190"><span class="hs-identifier hs-var">occ_env</span></a></span><span> </span><span class="annot"><span class="annottext">TidyOccEnv -&gt; [FastString] -&gt; TidyOccEnv
</span><a href="GHC.Types.Name.Occurrence.html#delTidyOccEnvList"><span class="hs-operator hs-var">`delTidyOccEnvList`</span></a></span><span> </span><span class="annot"><span class="annottext">(Var -&gt; FastString) -&gt; [Var] -&gt; [FastString]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; FastString
</span><a href="GHC.Types.Name.Occurrence.html#occNameFS"><span class="hs-identifier hs-var hs-var">occNameFS</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; FastString) -&gt; (Var -&gt; OccName) -&gt; Var -&gt; FastString
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811188"><span class="hs-identifier hs-var">vs</span></a></span><span>
</span><span id="line-432"></span><span>    </span><span id="local-6989586621680811186"><span class="annot"><span class="annottext">var_env' :: UniqFM Var Var
</span><a href="#local-6989586621680811186"><span class="hs-identifier hs-var hs-var">var_env'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var
</span><a href="#local-6989586621680811189"><span class="hs-identifier hs-var">var_env</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Var Var -&gt; [Var] -&gt; UniqFM Var Var
forall a. VarEnv a -&gt; [Var] -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#delVarEnvList"><span class="hs-operator hs-var">`delVarEnvList`</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811188"><span class="hs-identifier hs-var">vs</span></a></span><span>
</span><span id="line-433"></span><span>
</span><span id="line-434"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{@VarEnv@s}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-441"></span><span>
</span><span id="line-442"></span><span class="hs-comment">-- We would like this to be `UniqFM Var elt`</span><span>
</span><span id="line-443"></span><span class="hs-comment">-- but the code uses various key types.</span><span>
</span><span id="line-444"></span><span class="hs-comment">-- So for now make it explicitly untyped</span><span>
</span><span id="line-445"></span><span>
</span><span id="line-446"></span><span class="hs-comment">-- | Variable Environment</span><span>
</span><span id="line-447"></span><span class="hs-keyword">type</span><span> </span><span id="VarEnv"><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-var">VarEnv</span></a></span></span><span> </span><span id="local-6989586621680811180"><span class="annot"><a href="#local-6989586621680811180"><span class="hs-identifier hs-type">elt</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811180"><span class="hs-identifier hs-type">elt</span></a></span><span>
</span><span id="line-448"></span><span>
</span><span id="line-449"></span><span class="hs-comment">-- | Identifier Environment</span><span>
</span><span id="line-450"></span><span class="hs-keyword">type</span><span> </span><span id="IdEnv"><span class="annot"><a href="GHC.Types.Var.Env.html#IdEnv"><span class="hs-identifier hs-var">IdEnv</span></a></span></span><span> </span><span id="local-6989586621680811179"><span class="annot"><a href="#local-6989586621680811179"><span class="hs-identifier hs-type">elt</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811179"><span class="hs-identifier hs-type">elt</span></a></span><span>
</span><span id="line-451"></span><span>
</span><span id="line-452"></span><span class="hs-comment">-- | Type Variable Environment</span><span>
</span><span id="line-453"></span><span class="hs-keyword">type</span><span> </span><span id="TyVarEnv"><span class="annot"><a href="GHC.Types.Var.Env.html#TyVarEnv"><span class="hs-identifier hs-var">TyVarEnv</span></a></span></span><span> </span><span id="local-6989586621680811177"><span class="annot"><a href="#local-6989586621680811177"><span class="hs-identifier hs-type">elt</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811177"><span class="hs-identifier hs-type">elt</span></a></span><span>
</span><span id="line-454"></span><span>
</span><span id="line-455"></span><span class="hs-comment">-- | Type or Coercion Variable Environment</span><span>
</span><span id="line-456"></span><span class="hs-keyword">type</span><span> </span><span id="TyCoVarEnv"><span class="annot"><a href="GHC.Types.Var.Env.html#TyCoVarEnv"><span class="hs-identifier hs-var">TyCoVarEnv</span></a></span></span><span> </span><span id="local-6989586621680811176"><span class="annot"><a href="#local-6989586621680811176"><span class="hs-identifier hs-type">elt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#TyCoVar"><span class="hs-identifier hs-type">TyCoVar</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811176"><span class="hs-identifier hs-type">elt</span></a></span><span>
</span><span id="line-457"></span><span>
</span><span id="line-458"></span><span class="hs-comment">-- | Coercion Variable Environment</span><span>
</span><span id="line-459"></span><span class="hs-keyword">type</span><span> </span><span id="CoVarEnv"><span class="annot"><a href="GHC.Types.Var.Env.html#CoVarEnv"><span class="hs-identifier hs-var">CoVarEnv</span></a></span></span><span> </span><span id="local-6989586621680811174"><span class="annot"><a href="#local-6989586621680811174"><span class="hs-identifier hs-type">elt</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#CoVar"><span class="hs-identifier hs-type">CoVar</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811174"><span class="hs-identifier hs-type">elt</span></a></span><span>
</span><span id="line-460"></span><span>
</span><span id="line-461"></span><span id="local-6989586621680811695"><span class="annot"><a href="GHC.Types.Var.Env.html#emptyVarEnv"><span class="hs-identifier hs-type">emptyVarEnv</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811695"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-462"></span><span id="local-6989586621680811588"><span class="annot"><a href="GHC.Types.Var.Env.html#mkVarEnv"><span class="hs-identifier hs-type">mkVarEnv</span></a></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680811588"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811588"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-463"></span><span id="local-6989586621680811584"><span class="annot"><a href="GHC.Types.Var.Env.html#mkVarEnv_Directly"><span class="hs-identifier hs-type">mkVarEnv_Directly</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680811584"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811584"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-464"></span><span id="local-6989586621680811560"><span class="annot"><a href="GHC.Types.Var.Env.html#zipVarEnv"><span class="hs-identifier hs-type">zipVarEnv</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680811560"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811560"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-465"></span><span id="local-6989586621680811577"><span class="annot"><a href="GHC.Types.Var.Env.html#unitVarEnv"><span class="hs-identifier hs-type">unitVarEnv</span></a></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811577"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811577"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-466"></span><span id="local-6989586621680811663"><span class="annot"><a href="GHC.Types.Var.Env.html#alterVarEnv"><span class="hs-identifier hs-type">alterVarEnv</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811663"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811663"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811663"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811663"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-467"></span><span id="local-6989586621680811688"><span class="annot"><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-type">extendVarEnv</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811688"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811688"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811688"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-468"></span><span id="local-6989586621680811656"><span class="annot"><a href="GHC.Types.Var.Env.html#extendVarEnv_C"><span class="hs-identifier hs-type">extendVarEnv_C</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811656"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621680811656"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621680811656"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811656"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811656"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811656"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-469"></span><span id="local-6989586621680811651"><span id="local-6989586621680811652"><span class="annot"><a href="GHC.Types.Var.Env.html#extendVarEnv_Acc"><span class="hs-identifier hs-type">extendVarEnv_Acc</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811652"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621680811651"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621680811651"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811652"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-glyph">-&gt;</span><span class="annot"><a href="#local-6989586621680811651"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811651"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811652"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811651"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-470"></span><span id="local-6989586621680811614"><span class="annot"><a href="GHC.Types.Var.Env.html#plusVarEnv"><span class="hs-identifier hs-type">plusVarEnv</span></a></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811614"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811614"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811614"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-471"></span><span id="local-6989586621680811610"><span class="annot"><a href="GHC.Types.Var.Env.html#plusVarEnvList"><span class="hs-identifier hs-type">plusVarEnvList</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811610"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811610"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-472"></span><span id="local-6989586621680811645"><span class="annot"><a href="GHC.Types.Var.Env.html#extendVarEnvList"><span class="hs-identifier hs-type">extendVarEnvList</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811645"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680811645"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811645"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-473"></span><span>
</span><span id="line-474"></span><span id="local-6989586621680811569"><span class="annot"><a href="GHC.Types.Var.Env.html#partitionVarEnv"><span class="hs-identifier hs-type">partitionVarEnv</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811569"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811569"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811569"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811569"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-475"></span><span id="local-6989586621680811565"><span class="annot"><a href="GHC.Types.Var.Env.html#restrictVarEnv"><span class="hs-identifier hs-type">restrictVarEnv</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811565"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#VarSet"><span class="hs-identifier hs-type">VarSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811565"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-476"></span><span id="local-6989586621680811686"><span class="annot"><a href="GHC.Types.Var.Env.html#delVarEnvList"><span class="hs-identifier hs-type">delVarEnvList</span></a></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811686"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811686"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-477"></span><span id="local-6989586621680811687"><span class="annot"><a href="GHC.Types.Var.Env.html#delVarEnv"><span class="hs-identifier hs-type">delVarEnv</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811687"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811687"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-478"></span><span id="local-6989586621680811620"><span id="local-6989586621680811621"><span class="annot"><a href="GHC.Types.Var.Env.html#minusVarEnv"><span class="hs-identifier hs-type">minusVarEnv</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811621"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811620"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811621"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-479"></span><span id="local-6989586621680811641"><span class="annot"><a href="GHC.Types.Var.Env.html#plusVarEnv_C"><span class="hs-identifier hs-type">plusVarEnv_C</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811641"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811641"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811641"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811641"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811641"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811641"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-480"></span><span id="local-6989586621680811637"><span class="annot"><a href="GHC.Types.Var.Env.html#plusVarEnv_CD"><span class="hs-identifier hs-type">plusVarEnv_CD</span></a></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811637"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811637"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811637"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811637"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811637"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811637"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811637"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811637"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-481"></span><span id="local-6989586621680811631"><span class="annot"><a href="GHC.Types.Var.Env.html#plusMaybeVarEnv_C"><span class="hs-identifier hs-type">plusMaybeVarEnv_C</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811631"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811631"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811631"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811631"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811631"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811631"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-482"></span><span id="local-6989586621680811594"><span id="local-6989586621680811595"><span class="annot"><a href="GHC.Types.Var.Env.html#mapVarEnv"><span class="hs-identifier hs-type">mapVarEnv</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811595"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811594"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811595"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811594"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-483"></span><span id="local-6989586621680811553"><span class="annot"><a href="GHC.Types.Var.Env.html#modifyVarEnv"><span class="hs-identifier hs-type">modifyVarEnv</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811553"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811553"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811553"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811553"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-484"></span><span>
</span><span id="line-485"></span><span id="local-6989586621680811573"><span class="annot"><a href="GHC.Types.Var.Env.html#isEmptyVarEnv"><span class="hs-identifier hs-type">isEmptyVarEnv</span></a></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811573"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-486"></span><span id="local-6989586621680811685"><span class="annot"><a href="GHC.Types.Var.Env.html#lookupVarEnv"><span class="hs-identifier hs-type">lookupVarEnv</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811685"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811685"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-487"></span><span id="local-6989586621680811603"><span class="annot"><a href="GHC.Types.Var.Env.html#filterVarEnv"><span class="hs-identifier hs-type">filterVarEnv</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811603"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811603"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811603"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-488"></span><span id="local-6989586621680811556"><span class="annot"><a href="GHC.Types.Var.Env.html#lookupVarEnv_NF"><span class="hs-identifier hs-type">lookupVarEnv_NF</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811556"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811556"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-489"></span><span id="local-6989586621680811599"><span class="annot"><a href="GHC.Types.Var.Env.html#lookupWithDefaultVarEnv"><span class="hs-identifier hs-type">lookupWithDefaultVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811599"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811599"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811599"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-490"></span><span id="local-6989586621680811683"><span class="annot"><a href="GHC.Types.Var.Env.html#elemVarEnv"><span class="hs-identifier hs-type">elemVarEnv</span></a></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811683"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-491"></span><span id="local-6989586621680811672"><span class="annot"><a href="GHC.Types.Var.Env.html#elemVarEnvByKey"><span class="hs-identifier hs-type">elemVarEnvByKey</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811672"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-492"></span><span id="local-6989586621680811668"><span class="annot"><a href="GHC.Types.Var.Env.html#disjointVarEnv"><span class="hs-identifier hs-type">disjointVarEnv</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811668"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#VarEnv"><span class="hs-identifier hs-type">VarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811668"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-493"></span><span>
</span><span id="line-494"></span><span id="elemVarEnv"><span class="annot"><span class="annottext">elemVarEnv :: forall a. Var -&gt; VarEnv a -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#elemVarEnv"><span class="hs-identifier hs-var hs-var">elemVarEnv</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; UniqFM Var a -&gt; Bool
forall key elt. Uniquable key =&gt; key -&gt; UniqFM key elt -&gt; Bool
</span><a href="GHC.Types.Unique.FM.html#elemUFM"><span class="hs-identifier hs-var">elemUFM</span></a></span><span>
</span><span id="line-495"></span><span id="elemVarEnvByKey"><span class="annot"><span class="annottext">elemVarEnvByKey :: forall a. Unique -&gt; VarEnv a -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#elemVarEnvByKey"><span class="hs-identifier hs-var hs-var">elemVarEnvByKey</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; UniqFM Var a -&gt; Bool
forall key elt. Unique -&gt; UniqFM key elt -&gt; Bool
</span><a href="GHC.Types.Unique.FM.html#elemUFM_Directly"><span class="hs-identifier hs-var">elemUFM_Directly</span></a></span><span>
</span><span id="line-496"></span><span id="disjointVarEnv"><span class="annot"><span class="annottext">disjointVarEnv :: forall a. VarEnv a -&gt; VarEnv a -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#disjointVarEnv"><span class="hs-identifier hs-var hs-var">disjointVarEnv</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var a -&gt; UniqFM Var a -&gt; Bool
forall key elt1 elt2. UniqFM key elt1 -&gt; UniqFM key elt2 -&gt; Bool
</span><a href="GHC.Types.Unique.FM.html#disjointUFM"><span class="hs-identifier hs-var">disjointUFM</span></a></span><span>
</span><span id="line-497"></span><span id="alterVarEnv"><span class="annot"><span class="annottext">alterVarEnv :: forall a. (Maybe a -&gt; Maybe a) -&gt; VarEnv a -&gt; Var -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#alterVarEnv"><span class="hs-identifier hs-var hs-var">alterVarEnv</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Maybe a -&gt; Maybe a) -&gt; UniqFM Var a -&gt; Var -&gt; UniqFM Var a
forall key elt.
Uniquable key =&gt;
(Maybe elt -&gt; Maybe elt) -&gt; UniqFM key elt -&gt; key -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#alterUFM"><span class="hs-identifier hs-var">alterUFM</span></a></span><span>
</span><span id="line-498"></span><span id="extendVarEnv"><span class="annot"><span class="annottext">extendVarEnv :: forall a. VarEnv a -&gt; Var -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-var hs-var">extendVarEnv</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var a -&gt; Var -&gt; a -&gt; UniqFM Var a
forall key elt.
Uniquable key =&gt;
UniqFM key elt -&gt; key -&gt; elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#addToUFM"><span class="hs-identifier hs-var">addToUFM</span></a></span><span>
</span><span id="line-499"></span><span id="extendVarEnv_C"><span class="annot"><span class="annottext">extendVarEnv_C :: forall a. (a -&gt; a -&gt; a) -&gt; VarEnv a -&gt; Var -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv_C"><span class="hs-identifier hs-var hs-var">extendVarEnv_C</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; UniqFM Var a -&gt; Var -&gt; a -&gt; UniqFM Var a
forall key elt.
Uniquable key =&gt;
(elt -&gt; elt -&gt; elt)
-&gt; UniqFM key elt -&gt; key -&gt; elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#addToUFM_C"><span class="hs-identifier hs-var">addToUFM_C</span></a></span><span>
</span><span id="line-500"></span><span id="extendVarEnv_Acc"><span class="annot"><span class="annottext">extendVarEnv_Acc :: forall a b.
(a -&gt; b -&gt; b) -&gt; (a -&gt; b) -&gt; VarEnv b -&gt; Var -&gt; a -&gt; VarEnv b
</span><a href="GHC.Types.Var.Env.html#extendVarEnv_Acc"><span class="hs-identifier hs-var hs-var">extendVarEnv_Acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; b)
-&gt; (a -&gt; b) -&gt; UniqFM Var b -&gt; Var -&gt; a -&gt; UniqFM Var b
forall key elt elts.
Uniquable key =&gt;
(elt -&gt; elts -&gt; elts)
-&gt; (elt -&gt; elts)
-&gt; UniqFM key elts
-&gt; key
-&gt; elt
-&gt; UniqFM key elts
</span><a href="GHC.Types.Unique.FM.html#addToUFM_Acc"><span class="hs-identifier hs-var">addToUFM_Acc</span></a></span><span>
</span><span id="line-501"></span><span id="extendVarEnvList"><span class="annot"><span class="annottext">extendVarEnvList :: forall a. VarEnv a -&gt; [(Var, a)] -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnvList"><span class="hs-identifier hs-var hs-var">extendVarEnvList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var a -&gt; [(Var, a)] -&gt; UniqFM Var a
forall key elt.
Uniquable key =&gt;
UniqFM key elt -&gt; [(key, elt)] -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#addListToUFM"><span class="hs-identifier hs-var">addListToUFM</span></a></span><span>
</span><span id="line-502"></span><span id="plusVarEnv_C"><span class="annot"><span class="annottext">plusVarEnv_C :: forall a. (a -&gt; a -&gt; a) -&gt; VarEnv a -&gt; VarEnv a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#plusVarEnv_C"><span class="hs-identifier hs-var hs-var">plusVarEnv_C</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; UniqFM Var a -&gt; UniqFM Var a -&gt; UniqFM Var a
forall elt key.
(elt -&gt; elt -&gt; elt)
-&gt; UniqFM key elt -&gt; UniqFM key elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#plusUFM_C"><span class="hs-identifier hs-var">plusUFM_C</span></a></span><span>
</span><span id="line-503"></span><span id="plusVarEnv_CD"><span class="annot"><span class="annottext">plusVarEnv_CD :: forall a.
(a -&gt; a -&gt; a) -&gt; VarEnv a -&gt; a -&gt; VarEnv a -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#plusVarEnv_CD"><span class="hs-identifier hs-var hs-var">plusVarEnv_CD</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a)
-&gt; UniqFM Var a -&gt; a -&gt; UniqFM Var a -&gt; a -&gt; UniqFM Var a
forall elta eltb eltc key.
(elta -&gt; eltb -&gt; eltc)
-&gt; UniqFM key elta
-&gt; elta
-&gt; UniqFM key eltb
-&gt; eltb
-&gt; UniqFM key eltc
</span><a href="GHC.Types.Unique.FM.html#plusUFM_CD"><span class="hs-identifier hs-var">plusUFM_CD</span></a></span><span>
</span><span id="line-504"></span><span id="plusMaybeVarEnv_C"><span class="annot"><span class="annottext">plusMaybeVarEnv_C :: forall a. (a -&gt; a -&gt; Maybe a) -&gt; VarEnv a -&gt; VarEnv a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#plusMaybeVarEnv_C"><span class="hs-identifier hs-var hs-var">plusMaybeVarEnv_C</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; Maybe a) -&gt; UniqFM Var a -&gt; UniqFM Var a -&gt; UniqFM Var a
forall elt key.
(elt -&gt; elt -&gt; Maybe elt)
-&gt; UniqFM key elt -&gt; UniqFM key elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#plusMaybeUFM_C"><span class="hs-identifier hs-var">plusMaybeUFM_C</span></a></span><span>
</span><span id="line-505"></span><span id="delVarEnvList"><span class="annot"><span class="annottext">delVarEnvList :: forall a. VarEnv a -&gt; [Var] -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#delVarEnvList"><span class="hs-identifier hs-var hs-var">delVarEnvList</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var a -&gt; [Var] -&gt; UniqFM Var a
forall key elt.
Uniquable key =&gt;
UniqFM key elt -&gt; [key] -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#delListFromUFM"><span class="hs-identifier hs-var">delListFromUFM</span></a></span><span>
</span><span id="line-506"></span><span id="delVarEnv"><span class="annot"><span class="annottext">delVarEnv :: forall a. VarEnv a -&gt; Var -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#delVarEnv"><span class="hs-identifier hs-var hs-var">delVarEnv</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var a -&gt; Var -&gt; UniqFM Var a
forall key elt.
Uniquable key =&gt;
UniqFM key elt -&gt; key -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#delFromUFM"><span class="hs-identifier hs-var">delFromUFM</span></a></span><span>
</span><span id="line-507"></span><span id="minusVarEnv"><span class="annot"><span class="annottext">minusVarEnv :: forall a b. VarEnv a -&gt; VarEnv b -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#minusVarEnv"><span class="hs-identifier hs-var hs-var">minusVarEnv</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var a -&gt; UniqFM Var b -&gt; UniqFM Var a
forall key elt1 elt2.
UniqFM key elt1 -&gt; UniqFM key elt2 -&gt; UniqFM key elt1
</span><a href="GHC.Types.Unique.FM.html#minusUFM"><span class="hs-identifier hs-var">minusUFM</span></a></span><span>
</span><span id="line-508"></span><span id="plusVarEnv"><span class="annot"><span class="annottext">plusVarEnv :: forall a. VarEnv a -&gt; VarEnv a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#plusVarEnv"><span class="hs-identifier hs-var hs-var">plusVarEnv</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var a -&gt; UniqFM Var a -&gt; UniqFM Var a
forall key elt. UniqFM key elt -&gt; UniqFM key elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#plusUFM"><span class="hs-identifier hs-var">plusUFM</span></a></span><span>
</span><span id="line-509"></span><span id="plusVarEnvList"><span class="annot"><span class="annottext">plusVarEnvList :: forall a. [VarEnv a] -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#plusVarEnvList"><span class="hs-identifier hs-var hs-var">plusVarEnvList</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UniqFM Var a] -&gt; UniqFM Var a
forall key elt. [UniqFM key elt] -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#plusUFMList"><span class="hs-identifier hs-var">plusUFMList</span></a></span><span>
</span><span id="line-510"></span><span id="lookupVarEnv"><span class="annot"><span class="annottext">lookupVarEnv :: forall a. VarEnv a -&gt; Var -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupVarEnv"><span class="hs-identifier hs-var hs-var">lookupVarEnv</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var a -&gt; Var -&gt; Maybe a
forall key elt. Uniquable key =&gt; UniqFM key elt -&gt; key -&gt; Maybe elt
</span><a href="GHC.Types.Unique.FM.html#lookupUFM"><span class="hs-identifier hs-var">lookupUFM</span></a></span><span>
</span><span id="line-511"></span><span id="filterVarEnv"><span class="annot"><span class="annottext">filterVarEnv :: forall a. (a -&gt; Bool) -&gt; VarEnv a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#filterVarEnv"><span class="hs-identifier hs-var hs-var">filterVarEnv</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; UniqFM Var a -&gt; UniqFM Var a
forall elt key. (elt -&gt; Bool) -&gt; UniqFM key elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#filterUFM"><span class="hs-identifier hs-var">filterUFM</span></a></span><span>
</span><span id="line-512"></span><span id="lookupWithDefaultVarEnv"><span class="annot"><span class="annottext">lookupWithDefaultVarEnv :: forall a. VarEnv a -&gt; a -&gt; Var -&gt; a
</span><a href="GHC.Types.Var.Env.html#lookupWithDefaultVarEnv"><span class="hs-identifier hs-var hs-var">lookupWithDefaultVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var a -&gt; a -&gt; Var -&gt; a
forall key elt.
Uniquable key =&gt;
UniqFM key elt -&gt; elt -&gt; key -&gt; elt
</span><a href="GHC.Types.Unique.FM.html#lookupWithDefaultUFM"><span class="hs-identifier hs-var">lookupWithDefaultUFM</span></a></span><span>
</span><span id="line-513"></span><span id="mapVarEnv"><span class="annot"><span class="annottext">mapVarEnv :: forall a b. (a -&gt; b) -&gt; VarEnv a -&gt; VarEnv b
</span><a href="GHC.Types.Var.Env.html#mapVarEnv"><span class="hs-identifier hs-var hs-var">mapVarEnv</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; UniqFM Var a -&gt; UniqFM Var b
forall elt1 elt2 key.
(elt1 -&gt; elt2) -&gt; UniqFM key elt1 -&gt; UniqFM key elt2
</span><a href="GHC.Types.Unique.FM.html#mapUFM"><span class="hs-identifier hs-var">mapUFM</span></a></span><span>
</span><span id="line-514"></span><span id="mkVarEnv"><span class="annot"><span class="annottext">mkVarEnv :: forall a. [(Var, a)] -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#mkVarEnv"><span class="hs-identifier hs-var hs-var">mkVarEnv</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Var, a)] -&gt; UniqFM Var a
forall key elt. Uniquable key =&gt; [(key, elt)] -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#listToUFM"><span class="hs-identifier hs-var">listToUFM</span></a></span><span>
</span><span id="line-515"></span><span id="mkVarEnv_Directly"><span class="annot"><span class="annottext">mkVarEnv_Directly :: forall a. [(Unique, a)] -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#mkVarEnv_Directly"><span class="hs-identifier hs-var hs-var">mkVarEnv_Directly</span></a></span></span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Unique, a)] -&gt; UniqFM Var a
forall elt key. [(Unique, elt)] -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#listToUFM_Directly"><span class="hs-identifier hs-var">listToUFM_Directly</span></a></span><span>
</span><span id="line-516"></span><span id="emptyVarEnv"><span class="annot"><span class="annottext">emptyVarEnv :: forall a. VarEnv a
</span><a href="GHC.Types.Var.Env.html#emptyVarEnv"><span class="hs-identifier hs-var hs-var">emptyVarEnv</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var a
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span>
</span><span id="line-517"></span><span id="unitVarEnv"><span class="annot"><span class="annottext">unitVarEnv :: forall a. Var -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#unitVarEnv"><span class="hs-identifier hs-var hs-var">unitVarEnv</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; a -&gt; UniqFM Var a
forall key elt. Uniquable key =&gt; key -&gt; elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#unitUFM"><span class="hs-identifier hs-var">unitUFM</span></a></span><span>
</span><span id="line-518"></span><span id="isEmptyVarEnv"><span class="annot"><span class="annottext">isEmptyVarEnv :: forall a. VarEnv a -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#isEmptyVarEnv"><span class="hs-identifier hs-var hs-var">isEmptyVarEnv</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Var a -&gt; Bool
forall key elt. UniqFM key elt -&gt; Bool
</span><a href="GHC.Types.Unique.FM.html#isNullUFM"><span class="hs-identifier hs-var">isNullUFM</span></a></span><span>
</span><span id="line-519"></span><span id="partitionVarEnv"><span class="annot"><span class="annottext">partitionVarEnv :: forall a. (a -&gt; Bool) -&gt; VarEnv a -&gt; (VarEnv a, VarEnv a)
</span><a href="GHC.Types.Var.Env.html#partitionVarEnv"><span class="hs-identifier hs-var hs-var">partitionVarEnv</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; UniqFM Var a -&gt; (UniqFM Var a, UniqFM Var a)
forall elt key.
(elt -&gt; Bool) -&gt; UniqFM key elt -&gt; (UniqFM key elt, UniqFM key elt)
</span><a href="GHC.Types.Unique.FM.html#partitionUFM"><span class="hs-identifier hs-var">partitionUFM</span></a></span><span>
</span><span id="line-520"></span><span>
</span><span id="line-521"></span><span id="restrictVarEnv"><span class="annot"><span class="annottext">restrictVarEnv :: forall a. VarEnv a -&gt; VarSet -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#restrictVarEnv"><span class="hs-identifier hs-var hs-var">restrictVarEnv</span></a></span></span><span> </span><span id="local-6989586621680811133"><span class="annot"><span class="annottext">VarEnv a
</span><a href="#local-6989586621680811133"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621680811132"><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811132"><span class="hs-identifier hs-var">vs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Unique -&gt; a -&gt; Bool) -&gt; VarEnv a -&gt; VarEnv a
forall elt key.
(Unique -&gt; elt -&gt; Bool) -&gt; UniqFM key elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#filterUFM_Directly"><span class="hs-identifier hs-var">filterUFM_Directly</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; a -&gt; Bool
forall {p}. Unique -&gt; p -&gt; Bool
</span><a href="#local-6989586621680811130"><span class="hs-identifier hs-var">keep</span></a></span><span> </span><span class="annot"><span class="annottext">VarEnv a
</span><a href="#local-6989586621680811133"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-522"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-523"></span><span>    </span><span id="local-6989586621680811130"><span class="annot"><span class="annottext">keep :: Unique -&gt; p -&gt; Bool
</span><a href="#local-6989586621680811130"><span class="hs-identifier hs-var hs-var">keep</span></a></span></span><span> </span><span id="local-6989586621680811129"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680811129"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="annot"><span class="annottext">p
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680811129"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; VarSet -&gt; Bool
</span><a href="GHC.Types.Var.Set.html#elemVarSetByKey"><span class="hs-operator hs-var">`elemVarSetByKey`</span></a></span><span> </span><span class="annot"><span class="annottext">VarSet
</span><a href="#local-6989586621680811132"><span class="hs-identifier hs-var">vs</span></a></span><span>
</span><span id="line-524"></span><span>
</span><span id="line-525"></span><span id="zipVarEnv"><span class="annot"><span class="annottext">zipVarEnv :: forall a. [Var] -&gt; [a] -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#zipVarEnv"><span class="hs-identifier hs-var hs-var">zipVarEnv</span></a></span></span><span> </span><span id="local-6989586621680811127"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811127"><span class="hs-identifier hs-var">tyvars</span></a></span></span><span> </span><span id="local-6989586621680811126"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680811126"><span class="hs-identifier hs-var">tys</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Var, a)] -&gt; VarEnv a
forall a. [(Var, a)] -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#mkVarEnv"><span class="hs-identifier hs-var">mkVarEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; [Var] -&gt; [a] -&gt; [(Var, a)]
forall a b. String -&gt; [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="GHC.Utils.Misc.html#zipEqual"><span class="hs-identifier hs-var">zipEqual</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;zipVarEnv&quot;</span></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680811127"><span class="hs-identifier hs-var">tyvars</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680811126"><span class="hs-identifier hs-var">tys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-526"></span><span id="lookupVarEnv_NF"><span class="annot"><span class="annottext">lookupVarEnv_NF :: forall a. VarEnv a -&gt; Var -&gt; a
</span><a href="GHC.Types.Var.Env.html#lookupVarEnv_NF"><span class="hs-identifier hs-var hs-var">lookupVarEnv_NF</span></a></span></span><span> </span><span id="local-6989586621680811124"><span class="annot"><span class="annottext">VarEnv a
</span><a href="#local-6989586621680811124"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621680811123"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811123"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VarEnv a -&gt; Var -&gt; Maybe a
forall a. VarEnv a -&gt; Var -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupVarEnv"><span class="hs-identifier hs-var">lookupVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">VarEnv a
</span><a href="#local-6989586621680811124"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811123"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-527"></span><span>                         </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680811122"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680811122"><span class="hs-identifier hs-var">xx</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680811122"><span class="hs-identifier hs-var">xx</span></a></span><span>
</span><span id="line-528"></span><span>                         </span><span class="annot"><span class="annottext">Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lookupVarEnv_NF: Nothing&quot;</span></span><span>
</span><span id="line-529"></span><span>
</span><span id="line-530"></span><span class="hs-comment">{-
@modifyVarEnv@: Look up a thing in the VarEnv,
then mash it with the modify function, and put it back.
-}</span><span>
</span><span id="line-534"></span><span>
</span><span id="line-535"></span><span id="modifyVarEnv"><span class="annot"><span class="annottext">modifyVarEnv :: forall a. (a -&gt; a) -&gt; VarEnv a -&gt; Var -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#modifyVarEnv"><span class="hs-identifier hs-var hs-var">modifyVarEnv</span></a></span></span><span> </span><span id="local-6989586621680811120"><span class="annot"><span class="annottext">a -&gt; a
</span><a href="#local-6989586621680811120"><span class="hs-identifier hs-var">mangle_fn</span></a></span></span><span> </span><span id="local-6989586621680811119"><span class="annot"><span class="annottext">VarEnv a
</span><a href="#local-6989586621680811119"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621680811118"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811118"><span class="hs-identifier hs-var">key</span></a></span></span><span>
</span><span id="line-536"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VarEnv a -&gt; Var -&gt; Maybe a
forall a. VarEnv a -&gt; Var -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupVarEnv"><span class="hs-identifier hs-var">lookupVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">VarEnv a
</span><a href="#local-6989586621680811119"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811118"><span class="hs-identifier hs-var">key</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-537"></span><span>      </span><span class="annot"><span class="annottext">Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">VarEnv a
</span><a href="#local-6989586621680811119"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-538"></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680811117"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680811117"><span class="hs-identifier hs-var">xx</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">VarEnv a -&gt; Var -&gt; a -&gt; VarEnv a
forall a. VarEnv a -&gt; Var -&gt; a -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#extendVarEnv"><span class="hs-identifier hs-var">extendVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">VarEnv a
</span><a href="#local-6989586621680811119"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811118"><span class="hs-identifier hs-var">key</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
</span><a href="#local-6989586621680811120"><span class="hs-identifier hs-var">mangle_fn</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680811117"><span class="hs-identifier hs-var">xx</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-539"></span><span>
</span><span id="line-540"></span><span id="local-6989586621680811550"><span id="local-6989586621680811551"><span class="annot"><a href="GHC.Types.Var.Env.html#modifyVarEnv_Directly"><span class="hs-identifier hs-type">modifyVarEnv_Directly</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811551"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811551"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811550"><span class="hs-identifier hs-type">key</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811551"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811550"><span class="hs-identifier hs-type">key</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811551"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-541"></span><span id="modifyVarEnv_Directly"><span class="annot"><span class="annottext">modifyVarEnv_Directly :: forall a key. (a -&gt; a) -&gt; UniqFM key a -&gt; Unique -&gt; UniqFM key a
</span><a href="GHC.Types.Var.Env.html#modifyVarEnv_Directly"><span class="hs-identifier hs-var hs-var">modifyVarEnv_Directly</span></a></span></span><span> </span><span id="local-6989586621680811116"><span class="annot"><span class="annottext">a -&gt; a
</span><a href="#local-6989586621680811116"><span class="hs-identifier hs-var">mangle_fn</span></a></span></span><span> </span><span id="local-6989586621680811115"><span class="annot"><span class="annottext">UniqFM key a
</span><a href="#local-6989586621680811115"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621680811114"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680811114"><span class="hs-identifier hs-var">key</span></a></span></span><span>
</span><span id="line-542"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqFM key a -&gt; Unique -&gt; Maybe a
forall key elt. UniqFM key elt -&gt; Unique -&gt; Maybe elt
</span><a href="GHC.Types.Unique.FM.html#lookupUFM_Directly"><span class="hs-identifier hs-var">lookupUFM_Directly</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM key a
</span><a href="#local-6989586621680811115"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680811114"><span class="hs-identifier hs-var">key</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-543"></span><span>      </span><span class="annot"><span class="annottext">Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UniqFM key a
</span><a href="#local-6989586621680811115"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-544"></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680811112"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680811112"><span class="hs-identifier hs-var">xx</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UniqFM key a -&gt; Unique -&gt; a -&gt; UniqFM key a
forall key elt. UniqFM key elt -&gt; Unique -&gt; elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#addToUFM_Directly"><span class="hs-identifier hs-var">addToUFM_Directly</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM key a
</span><a href="#local-6989586621680811115"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680811114"><span class="hs-identifier hs-var">key</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
</span><a href="#local-6989586621680811116"><span class="hs-identifier hs-var">mangle_fn</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680811112"><span class="hs-identifier hs-var">xx</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-545"></span><span>
</span><span id="line-546"></span><span class="hs-comment">-- Deterministic VarEnv</span><span>
</span><span id="line-547"></span><span class="hs-comment">-- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for explanation why we need</span><span>
</span><span id="line-548"></span><span class="hs-comment">-- DVarEnv.</span><span>
</span><span id="line-549"></span><span>
</span><span id="line-550"></span><span class="hs-comment">-- | Deterministic Variable Environment</span><span>
</span><span id="line-551"></span><span class="hs-keyword">type</span><span> </span><span id="DVarEnv"><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-var">DVarEnv</span></a></span></span><span> </span><span id="local-6989586621680811110"><span class="annot"><a href="#local-6989586621680811110"><span class="hs-identifier hs-type">elt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Unique.DFM.html#UniqDFM"><span class="hs-identifier hs-type">UniqDFM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811110"><span class="hs-identifier hs-type">elt</span></a></span><span>
</span><span id="line-552"></span><span>
</span><span id="line-553"></span><span class="hs-comment">-- | Deterministic Identifier Environment</span><span>
</span><span id="line-554"></span><span class="hs-comment">-- Sadly not always indexed by Id, but it is in the common case.</span><span>
</span><span id="line-555"></span><span class="hs-keyword">type</span><span> </span><span id="DIdEnv"><span class="annot"><a href="GHC.Types.Var.Env.html#DIdEnv"><span class="hs-identifier hs-var">DIdEnv</span></a></span></span><span> </span><span id="local-6989586621680811109"><span class="annot"><a href="#local-6989586621680811109"><span class="hs-identifier hs-type">elt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Unique.DFM.html#UniqDFM"><span class="hs-identifier hs-type">UniqDFM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811109"><span class="hs-identifier hs-type">elt</span></a></span><span>
</span><span id="line-556"></span><span>
</span><span id="line-557"></span><span class="hs-comment">-- | Deterministic Type Variable Environment</span><span>
</span><span id="line-558"></span><span class="hs-keyword">type</span><span> </span><span id="DTyVarEnv"><span class="annot"><a href="GHC.Types.Var.Env.html#DTyVarEnv"><span class="hs-identifier hs-var">DTyVarEnv</span></a></span></span><span> </span><span id="local-6989586621680811108"><span class="annot"><a href="#local-6989586621680811108"><span class="hs-identifier hs-type">elt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Unique.DFM.html#UniqDFM"><span class="hs-identifier hs-type">UniqDFM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811108"><span class="hs-identifier hs-type">elt</span></a></span><span>
</span><span id="line-559"></span><span>
</span><span id="line-560"></span><span id="local-6989586621680811543"><span class="annot"><a href="GHC.Types.Var.Env.html#emptyDVarEnv"><span class="hs-identifier hs-type">emptyDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811543"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-561"></span><span id="emptyDVarEnv"><span class="annot"><span class="annottext">emptyDVarEnv :: forall a. DVarEnv a
</span><a href="GHC.Types.Var.Env.html#emptyDVarEnv"><span class="hs-identifier hs-var hs-var">emptyDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqDFM Var a
forall key elt. UniqDFM key elt
</span><a href="GHC.Types.Unique.DFM.html#emptyUDFM"><span class="hs-identifier hs-var">emptyUDFM</span></a></span><span>
</span><span id="line-562"></span><span>
</span><span id="line-563"></span><span id="local-6989586621680811537"><span class="annot"><a href="GHC.Types.Var.Env.html#dVarEnvElts"><span class="hs-identifier hs-type">dVarEnvElts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811537"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680811537"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-564"></span><span id="dVarEnvElts"><span class="annot"><span class="annottext">dVarEnvElts :: forall a. DVarEnv a -&gt; [a]
</span><a href="GHC.Types.Var.Env.html#dVarEnvElts"><span class="hs-identifier hs-var hs-var">dVarEnvElts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqDFM Var a -&gt; [a]
forall key elt. UniqDFM key elt -&gt; [elt]
</span><a href="GHC.Types.Unique.DFM.html#eltsUDFM"><span class="hs-identifier hs-var">eltsUDFM</span></a></span><span>
</span><span id="line-565"></span><span>
</span><span id="line-566"></span><span id="local-6989586621680811533"><span class="annot"><a href="GHC.Types.Var.Env.html#mkDVarEnv"><span class="hs-identifier hs-type">mkDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680811533"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811533"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-567"></span><span id="mkDVarEnv"><span class="annot"><span class="annottext">mkDVarEnv :: forall a. [(Var, a)] -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#mkDVarEnv"><span class="hs-identifier hs-var hs-var">mkDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Var, a)] -&gt; UniqDFM Var a
forall key elt. Uniquable key =&gt; [(key, elt)] -&gt; UniqDFM key elt
</span><a href="GHC.Types.Unique.DFM.html#listToUDFM"><span class="hs-identifier hs-var">listToUDFM</span></a></span><span>
</span><span id="line-568"></span><span>
</span><span id="line-569"></span><span id="local-6989586621680811529"><span class="annot"><a href="GHC.Types.Var.Env.html#extendDVarEnv"><span class="hs-identifier hs-type">extendDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811529"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811529"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811529"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-570"></span><span id="extendDVarEnv"><span class="annot"><span class="annottext">extendDVarEnv :: forall a. DVarEnv a -&gt; Var -&gt; a -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#extendDVarEnv"><span class="hs-identifier hs-var hs-var">extendDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqDFM Var a -&gt; Var -&gt; a -&gt; UniqDFM Var a
forall key elt.
Uniquable key =&gt;
UniqDFM key elt -&gt; key -&gt; elt -&gt; UniqDFM key elt
</span><a href="GHC.Types.Unique.DFM.html#addToUDFM"><span class="hs-identifier hs-var">addToUDFM</span></a></span><span>
</span><span id="line-571"></span><span>
</span><span id="line-572"></span><span id="local-6989586621680811524"><span id="local-6989586621680811525"><span class="annot"><a href="GHC.Types.Var.Env.html#minusDVarEnv"><span class="hs-identifier hs-type">minusDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811525"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811524"><span class="hs-identifier hs-type">a'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811525"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-573"></span><span id="minusDVarEnv"><span class="annot"><span class="annottext">minusDVarEnv :: forall a a'. DVarEnv a -&gt; DVarEnv a' -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#minusDVarEnv"><span class="hs-identifier hs-var hs-var">minusDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqDFM Var a -&gt; UniqDFM Var a' -&gt; UniqDFM Var a
forall key elt1 elt2.
UniqDFM key elt1 -&gt; UniqDFM key elt2 -&gt; UniqDFM key elt1
</span><a href="GHC.Types.Unique.DFM.html#minusUDFM"><span class="hs-identifier hs-var">minusUDFM</span></a></span><span>
</span><span id="line-574"></span><span>
</span><span id="line-575"></span><span id="local-6989586621680811518"><span class="annot"><a href="GHC.Types.Var.Env.html#lookupDVarEnv"><span class="hs-identifier hs-type">lookupDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811518"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811518"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-576"></span><span id="lookupDVarEnv"><span class="annot"><span class="annottext">lookupDVarEnv :: forall a. DVarEnv a -&gt; Var -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupDVarEnv"><span class="hs-identifier hs-var hs-var">lookupDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqDFM Var a -&gt; Var -&gt; Maybe a
forall key elt.
Uniquable key =&gt;
UniqDFM key elt -&gt; key -&gt; Maybe elt
</span><a href="GHC.Types.Unique.DFM.html#lookupUDFM"><span class="hs-identifier hs-var">lookupUDFM</span></a></span><span>
</span><span id="line-577"></span><span>
</span><span id="line-578"></span><span id="local-6989586621680811513"><span id="local-6989586621680811514"><span class="annot"><a href="GHC.Types.Var.Env.html#foldDVarEnv"><span class="hs-identifier hs-type">foldDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811514"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811513"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811513"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811513"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811514"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811513"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-579"></span><span id="foldDVarEnv"><span class="annot"><span class="annottext">foldDVarEnv :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; DVarEnv a -&gt; b
</span><a href="GHC.Types.Var.Env.html#foldDVarEnv"><span class="hs-identifier hs-var hs-var">foldDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; b) -&gt; b -&gt; UniqDFM Var a -&gt; b
forall elt a key. (elt -&gt; a -&gt; a) -&gt; a -&gt; UniqDFM key elt -&gt; a
</span><a href="GHC.Types.Unique.DFM.html#foldUDFM"><span class="hs-identifier hs-var">foldUDFM</span></a></span><span>
</span><span id="line-580"></span><span>
</span><span id="line-581"></span><span class="hs-comment">-- See Note [Deterministic UniqFM] to learn about nondeterminism.</span><span>
</span><span id="line-582"></span><span class="hs-comment">-- If you use this please provide a justification why it doesn't introduce</span><span>
</span><span id="line-583"></span><span class="hs-comment">-- nondeterminism.</span><span>
</span><span id="line-584"></span><span id="local-6989586621680811095"><span id="local-6989586621680811096"><span class="annot"><a href="GHC.Types.Var.Env.html#nonDetStrictFoldDVarEnv"><span class="hs-identifier hs-type">nonDetStrictFoldDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811096"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811095"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811095"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811095"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811096"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811095"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-585"></span><span id="nonDetStrictFoldDVarEnv"><span class="annot"><span class="annottext">nonDetStrictFoldDVarEnv :: forall a b. (a -&gt; b -&gt; b) -&gt; b -&gt; DVarEnv a -&gt; b
</span><a href="GHC.Types.Var.Env.html#nonDetStrictFoldDVarEnv"><span class="hs-identifier hs-var hs-var">nonDetStrictFoldDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b -&gt; b) -&gt; b -&gt; UniqDFM Var a -&gt; b
forall elt a key. (elt -&gt; a -&gt; a) -&gt; a -&gt; UniqDFM key elt -&gt; a
</span><a href="GHC.Types.Unique.DFM.html#nonDetStrictFoldUDFM"><span class="hs-identifier hs-var">nonDetStrictFoldUDFM</span></a></span><span>
</span><span id="line-586"></span><span>
</span><span id="line-587"></span><span id="local-6989586621680811504"><span id="local-6989586621680811505"><span class="annot"><a href="GHC.Types.Var.Env.html#mapDVarEnv"><span class="hs-identifier hs-type">mapDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811505"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811504"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811505"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811504"><span class="hs-identifier hs-type">b</span></a></span></span></span><span>
</span><span id="line-588"></span><span id="mapDVarEnv"><span class="annot"><span class="annottext">mapDVarEnv :: forall a b. (a -&gt; b) -&gt; DVarEnv a -&gt; DVarEnv b
</span><a href="GHC.Types.Var.Env.html#mapDVarEnv"><span class="hs-identifier hs-var hs-var">mapDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; UniqDFM Var a -&gt; UniqDFM Var b
forall elt1 elt2 key.
(elt1 -&gt; elt2) -&gt; UniqDFM key elt1 -&gt; UniqDFM key elt2
</span><a href="GHC.Types.Unique.DFM.html#mapUDFM"><span class="hs-identifier hs-var">mapUDFM</span></a></span><span>
</span><span id="line-589"></span><span>
</span><span id="line-590"></span><span id="local-6989586621680811498"><span class="annot"><a href="GHC.Types.Var.Env.html#filterDVarEnv"><span class="hs-identifier hs-type">filterDVarEnv</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811498"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811498"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811498"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-591"></span><span id="filterDVarEnv"><span class="annot"><span class="annottext">filterDVarEnv :: forall a. (a -&gt; Bool) -&gt; DVarEnv a -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#filterDVarEnv"><span class="hs-identifier hs-var hs-var">filterDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; UniqDFM Var a -&gt; UniqDFM Var a
forall elt key. (elt -&gt; Bool) -&gt; UniqDFM key elt -&gt; UniqDFM key elt
</span><a href="GHC.Types.Unique.DFM.html#filterUDFM"><span class="hs-identifier hs-var">filterUDFM</span></a></span><span>
</span><span id="line-592"></span><span>
</span><span id="line-593"></span><span id="local-6989586621680811494"><span class="annot"><a href="GHC.Types.Var.Env.html#alterDVarEnv"><span class="hs-identifier hs-type">alterDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811494"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811494"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811494"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811494"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-594"></span><span id="alterDVarEnv"><span class="annot"><span class="annottext">alterDVarEnv :: forall a. (Maybe a -&gt; Maybe a) -&gt; DVarEnv a -&gt; Var -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#alterDVarEnv"><span class="hs-identifier hs-var hs-var">alterDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Maybe a -&gt; Maybe a) -&gt; UniqDFM Var a -&gt; Var -&gt; UniqDFM Var a
forall key elt.
Uniquable key =&gt;
(Maybe elt -&gt; Maybe elt)
-&gt; UniqDFM key elt -&gt; key -&gt; UniqDFM key elt
</span><a href="GHC.Types.Unique.DFM.html#alterUDFM"><span class="hs-identifier hs-var">alterUDFM</span></a></span><span>
</span><span id="line-595"></span><span>
</span><span id="line-596"></span><span id="local-6989586621680811490"><span class="annot"><a href="GHC.Types.Var.Env.html#plusDVarEnv"><span class="hs-identifier hs-type">plusDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811490"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811490"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811490"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-597"></span><span id="plusDVarEnv"><span class="annot"><span class="annottext">plusDVarEnv :: forall a. DVarEnv a -&gt; DVarEnv a -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#plusDVarEnv"><span class="hs-identifier hs-var hs-var">plusDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqDFM Var a -&gt; UniqDFM Var a -&gt; UniqDFM Var a
forall key elt.
UniqDFM key elt -&gt; UniqDFM key elt -&gt; UniqDFM key elt
</span><a href="GHC.Types.Unique.DFM.html#plusUDFM"><span class="hs-identifier hs-var">plusUDFM</span></a></span><span>
</span><span id="line-598"></span><span>
</span><span id="line-599"></span><span id="local-6989586621680811486"><span class="annot"><a href="GHC.Types.Var.Env.html#plusDVarEnv_C"><span class="hs-identifier hs-type">plusDVarEnv_C</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811486"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811486"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811486"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811486"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811486"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811486"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-600"></span><span id="plusDVarEnv_C"><span class="annot"><span class="annottext">plusDVarEnv_C :: forall a. (a -&gt; a -&gt; a) -&gt; DVarEnv a -&gt; DVarEnv a -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#plusDVarEnv_C"><span class="hs-identifier hs-var hs-var">plusDVarEnv_C</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; UniqDFM Var a -&gt; UniqDFM Var a -&gt; UniqDFM Var a
forall elt key.
(elt -&gt; elt -&gt; elt)
-&gt; UniqDFM key elt -&gt; UniqDFM key elt -&gt; UniqDFM key elt
</span><a href="GHC.Types.Unique.DFM.html#plusUDFM_C"><span class="hs-identifier hs-var">plusUDFM_C</span></a></span><span>
</span><span id="line-601"></span><span>
</span><span id="line-602"></span><span id="local-6989586621680811482"><span class="annot"><a href="GHC.Types.Var.Env.html#unitDVarEnv"><span class="hs-identifier hs-type">unitDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811482"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811482"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-603"></span><span id="unitDVarEnv"><span class="annot"><span class="annottext">unitDVarEnv :: forall a. Var -&gt; a -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#unitDVarEnv"><span class="hs-identifier hs-var hs-var">unitDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; a -&gt; UniqDFM Var a
forall key elt. Uniquable key =&gt; key -&gt; elt -&gt; UniqDFM key elt
</span><a href="GHC.Types.Unique.DFM.html#unitUDFM"><span class="hs-identifier hs-var">unitUDFM</span></a></span><span>
</span><span id="line-604"></span><span>
</span><span id="line-605"></span><span id="local-6989586621680811478"><span class="annot"><a href="GHC.Types.Var.Env.html#delDVarEnv"><span class="hs-identifier hs-type">delDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811478"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811478"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-606"></span><span id="delDVarEnv"><span class="annot"><span class="annottext">delDVarEnv :: forall a. DVarEnv a -&gt; Var -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#delDVarEnv"><span class="hs-identifier hs-var hs-var">delDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqDFM Var a -&gt; Var -&gt; UniqDFM Var a
forall key elt.
Uniquable key =&gt;
UniqDFM key elt -&gt; key -&gt; UniqDFM key elt
</span><a href="GHC.Types.Unique.DFM.html#delFromUDFM"><span class="hs-identifier hs-var">delFromUDFM</span></a></span><span>
</span><span id="line-607"></span><span>
</span><span id="line-608"></span><span id="local-6989586621680811474"><span class="annot"><a href="GHC.Types.Var.Env.html#delDVarEnvList"><span class="hs-identifier hs-type">delDVarEnvList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811474"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811474"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-609"></span><span id="delDVarEnvList"><span class="annot"><span class="annottext">delDVarEnvList :: forall a. DVarEnv a -&gt; [Var] -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#delDVarEnvList"><span class="hs-identifier hs-var hs-var">delDVarEnvList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqDFM Var a -&gt; [Var] -&gt; UniqDFM Var a
forall key elt.
Uniquable key =&gt;
UniqDFM key elt -&gt; [key] -&gt; UniqDFM key elt
</span><a href="GHC.Types.Unique.DFM.html#delListFromUDFM"><span class="hs-identifier hs-var">delListFromUDFM</span></a></span><span>
</span><span id="line-610"></span><span>
</span><span id="line-611"></span><span id="local-6989586621680811470"><span class="annot"><a href="GHC.Types.Var.Env.html#isEmptyDVarEnv"><span class="hs-identifier hs-type">isEmptyDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811470"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-612"></span><span id="isEmptyDVarEnv"><span class="annot"><span class="annottext">isEmptyDVarEnv :: forall a. DVarEnv a -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#isEmptyDVarEnv"><span class="hs-identifier hs-var hs-var">isEmptyDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqDFM Var a -&gt; Bool
forall key elt. UniqDFM key elt -&gt; Bool
</span><a href="GHC.Types.Unique.DFM.html#isNullUDFM"><span class="hs-identifier hs-var">isNullUDFM</span></a></span><span>
</span><span id="line-613"></span><span>
</span><span id="line-614"></span><span id="local-6989586621680811466"><span class="annot"><a href="GHC.Types.Var.Env.html#elemDVarEnv"><span class="hs-identifier hs-type">elemDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811466"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-615"></span><span id="elemDVarEnv"><span class="annot"><span class="annottext">elemDVarEnv :: forall a. Var -&gt; DVarEnv a -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#elemDVarEnv"><span class="hs-identifier hs-var hs-var">elemDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; UniqDFM Var a -&gt; Bool
forall key elt. Uniquable key =&gt; key -&gt; UniqDFM key elt -&gt; Bool
</span><a href="GHC.Types.Unique.DFM.html#elemUDFM"><span class="hs-identifier hs-var">elemUDFM</span></a></span><span>
</span><span id="line-616"></span><span>
</span><span id="line-617"></span><span id="local-6989586621680811462"><span class="annot"><a href="GHC.Types.Var.Env.html#extendDVarEnv_C"><span class="hs-identifier hs-type">extendDVarEnv_C</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811462"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811462"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811462"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811462"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811462"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811462"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-618"></span><span id="extendDVarEnv_C"><span class="annot"><span class="annottext">extendDVarEnv_C :: forall a. (a -&gt; a -&gt; a) -&gt; DVarEnv a -&gt; Var -&gt; a -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#extendDVarEnv_C"><span class="hs-identifier hs-var hs-var">extendDVarEnv_C</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; a -&gt; a) -&gt; UniqDFM Var a -&gt; Var -&gt; a -&gt; UniqDFM Var a
forall key elt.
Uniquable key =&gt;
(elt -&gt; elt -&gt; elt)
-&gt; UniqDFM key elt -&gt; key -&gt; elt -&gt; UniqDFM key elt
</span><a href="GHC.Types.Unique.DFM.html#addToUDFM_C"><span class="hs-identifier hs-var">addToUDFM_C</span></a></span><span>
</span><span id="line-619"></span><span>
</span><span id="line-620"></span><span id="local-6989586621680811458"><span class="annot"><a href="GHC.Types.Var.Env.html#modifyDVarEnv"><span class="hs-identifier hs-type">modifyDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811458"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680811458"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811458"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811458"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-621"></span><span id="modifyDVarEnv"><span class="annot"><span class="annottext">modifyDVarEnv :: forall a. (a -&gt; a) -&gt; DVarEnv a -&gt; Var -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#modifyDVarEnv"><span class="hs-identifier hs-var hs-var">modifyDVarEnv</span></a></span></span><span> </span><span id="local-6989586621680811076"><span class="annot"><span class="annottext">a -&gt; a
</span><a href="#local-6989586621680811076"><span class="hs-identifier hs-var">mangle_fn</span></a></span></span><span> </span><span id="local-6989586621680811075"><span class="annot"><span class="annottext">DVarEnv a
</span><a href="#local-6989586621680811075"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621680811074"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811074"><span class="hs-identifier hs-var">key</span></a></span></span><span>
</span><span id="line-622"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DVarEnv a -&gt; Var -&gt; Maybe a
forall a. DVarEnv a -&gt; Var -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupDVarEnv"><span class="hs-identifier hs-var">lookupDVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">DVarEnv a
</span><a href="#local-6989586621680811075"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811074"><span class="hs-identifier hs-var">key</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-623"></span><span>      </span><span class="annot"><span class="annottext">Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DVarEnv a
</span><a href="#local-6989586621680811075"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-624"></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680811073"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680811073"><span class="hs-identifier hs-var">xx</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DVarEnv a -&gt; Var -&gt; a -&gt; DVarEnv a
forall a. DVarEnv a -&gt; Var -&gt; a -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#extendDVarEnv"><span class="hs-identifier hs-var">extendDVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">DVarEnv a
</span><a href="#local-6989586621680811075"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680811074"><span class="hs-identifier hs-var">key</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a
</span><a href="#local-6989586621680811076"><span class="hs-identifier hs-var">mangle_fn</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680811073"><span class="hs-identifier hs-var">xx</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-625"></span><span>
</span><span id="line-626"></span><span id="local-6989586621680811456"><span class="annot"><a href="GHC.Types.Var.Env.html#partitionDVarEnv"><span class="hs-identifier hs-type">partitionDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811456"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811456"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811456"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811456"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-627"></span><span id="partitionDVarEnv"><span class="annot"><span class="annottext">partitionDVarEnv :: forall a. (a -&gt; Bool) -&gt; DVarEnv a -&gt; (DVarEnv a, DVarEnv a)
</span><a href="GHC.Types.Var.Env.html#partitionDVarEnv"><span class="hs-identifier hs-var hs-var">partitionDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; UniqDFM Var a -&gt; (UniqDFM Var a, UniqDFM Var a)
forall elt key.
(elt -&gt; Bool)
-&gt; UniqDFM key elt -&gt; (UniqDFM key elt, UniqDFM key elt)
</span><a href="GHC.Types.Unique.DFM.html#partitionUDFM"><span class="hs-identifier hs-var">partitionUDFM</span></a></span><span>
</span><span id="line-628"></span><span>
</span><span id="line-629"></span><span id="local-6989586621680811452"><span class="annot"><a href="GHC.Types.Var.Env.html#extendDVarEnvList"><span class="hs-identifier hs-type">extendDVarEnvList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811452"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680811452"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811452"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-630"></span><span id="extendDVarEnvList"><span class="annot"><span class="annottext">extendDVarEnvList :: forall a. DVarEnv a -&gt; [(Var, a)] -&gt; DVarEnv a
</span><a href="GHC.Types.Var.Env.html#extendDVarEnvList"><span class="hs-identifier hs-var hs-var">extendDVarEnvList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqDFM Var a -&gt; [(Var, a)] -&gt; UniqDFM Var a
forall key elt.
Uniquable key =&gt;
UniqDFM key elt -&gt; [(key, elt)] -&gt; UniqDFM key elt
</span><a href="GHC.Types.Unique.DFM.html#addListToUDFM"><span class="hs-identifier hs-var">addListToUDFM</span></a></span><span>
</span><span id="line-631"></span><span>
</span><span id="line-632"></span><span id="local-6989586621680811448"><span class="annot"><a href="GHC.Types.Var.Env.html#anyDVarEnv"><span class="hs-identifier hs-type">anyDVarEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680811448"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#DVarEnv"><span class="hs-identifier hs-type">DVarEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680811448"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-633"></span><span id="anyDVarEnv"><span class="annot"><span class="annottext">anyDVarEnv :: forall a. (a -&gt; Bool) -&gt; DVarEnv a -&gt; Bool
</span><a href="GHC.Types.Var.Env.html#anyDVarEnv"><span class="hs-identifier hs-var hs-var">anyDVarEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; Bool) -&gt; UniqDFM Var a -&gt; Bool
forall elt key. (elt -&gt; Bool) -&gt; UniqDFM key elt -&gt; Bool
</span><a href="GHC.Types.Unique.DFM.html#anyUDFM"><span class="hs-identifier hs-var">anyUDFM</span></a></span><span>
</span><span id="line-634"></span></pre></body></html>